Skip to content

Commit 79437de

Browse files
committed
fixed xml:id tag
1 parent c0fb145 commit 79437de

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

source/ch8_filehandling.ptx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -340,17 +340,17 @@ public class CreateFile {
340340
<p>
341341
And that's it! We will add our code to the foundational code for a complete program. First, <xref ref="file-write-full-python" text="type-global"/> shows the completed Python code.
342342
</p>
343-
<data xml:id="my-file-8-4-2">
343+
<data xml:id="data-file-write-full-python">
344344
<title>Data file for writing example</title>
345-
<datafile label="my-file-8-4-4" filename="myfile.txt" xml:id= "my-file-8-4-4" editable="yes">
345+
<datafile label="data-file-write-full-python" filename="myfile.txt" editable="yes">
346346
<pre>
347347

348348
</pre>
349349
</datafile>
350350
</data>
351351

352352
<listing xml:id="file-write-full-python">
353-
<program interactive="activecode" language="python" add-files="my-file-8-4-4">
353+
<program interactive="activecode" language="python" add-files="data-file-write-full-python">
354354
<code>
355355
try:
356356
with open("myfile.txt", "w") as my_writer:
@@ -367,14 +367,14 @@ public class CreateFile {
367367
<p>
368368
<xref ref="file-write-full-java" text="type-global"/> shows the completed Java code.
369369
</p>
370-
<data xml:id="my-file-8-4-5">
370+
<data xml:id="data-file-write-full-java">
371371
<title>Data file for writing example</title>
372-
<datafile label="my-file-8-4-5" filename="myfile.txt" xml:id= "my-file-8-4-5" editable="yes">
372+
<datafile label="data-file-write-full-java" filename="myfile.txt" editable="yes">
373373
<pre>
374374

375375
</pre>
376376
</datafile>
377-
<program xml:id="file-write-full-java" interactive="activecode" language="java" add-files = "my-file-8-4-5">
377+
<program xml:id="file-write-full-java" interactive="activecode" language="java" add-files = "data-file-write-full-java">
378378
<code>
379379
import java.io.FileWriter;
380380
import java.io.IOException;
@@ -415,17 +415,17 @@ public class CreateFile {
415415
<p>
416416
Now, when we use <c>write()</c> method like before, the text will be appended if there is already tSext in the document. If we were to update our code to include the <c>boolean</c> argument as shown in <xref ref="file-write-with-append" text="type-global"/>.
417417

418-
<data xml:id="my-file-8-4-6">
418+
<data xml:id="data-file-write-with-append">
419419
<title>Data file for writing example</title>
420-
<datafile label="my-file-8-4-6" filename="myfile" editable="yes">
420+
<datafile label="data-file-write-with-append" filename="myfile" editable="yes">
421421
<pre>
422422

423423
</pre>
424424
</datafile>
425425
</data>
426426

427427
<listing xml:id="file-write-with-append">
428-
<program interactive="activecode" language="java" add-files = "my-file-8-4-6">
428+
<program interactive="activecode" language="java" add-files = "data-file-write-with-append">
429429
<code>
430430
import java.io.FileWriter;
431431
import java.io.IOException;

0 commit comments

Comments
 (0)