Dear,
I'm Kenshi Muto, am supervising Japanese translation version of this book with O'Reilly Japan.
In Chapter 3, I'm very confusing.
[Issue 1]
'CourseDescription' makes a confusion.
Chapter 2 p.9: you showed simple DTD (A). It won't use CourseDescription.
Chapter 3 p.15: you pull another DTD (B), uses CourseDecription.
Chapter 3 p.37: minor change of DTD-B (C). CourseDescription is a next sibling of CourseDescription_Major.
p.15-16 Figure3-2 and step description: on DTD-A
p.17 sample XML: on DTD-B
p.19-20 import sample XML: on DTD-A. -> won't work!
p.22 Figure3-9: on DTD-A
p.23 Figure3-10: on DTD-A -> very different from p.17 sample.
p.27 Figure3-14: on DTD-A
p.28 unmarked XML: on DTD-B
p.35-36 on both DTD-A / DTD-B
p.37 another pattern sample XML: on DTD-C
p.51 Figure6-1: on DTD-A?
p.63 Example8-1: on DTD-C?
So... at this time, these conflicting prevents to reproduce the step is written in book.
Unifiying one DTD introduces a lot of changes, I believe also.
Iissue 2]
There are 'CouseDescription_Head' tag name at some places and figures. It might be unified to CourseDescription_Name.
[Issue 3]
To bind TextFrame to CourseDescriptions element, I believe we have to change [Root] tag to [CourseDescriptions] before going step 1 on p.16. Furthermore, I think we should drag-and-drop element to TextFrame instead of using Tag palette.
Note from the Author or Editor:
The reviewer's comments are sometimes correct but sometimes don't take into account the context of the XML in the different parts of the book.
I agree that the DTD on p.15 doesn't coincide with the example on p. 16 because I omitted the CourseDescription level around CourseDescription_Major. We don't need the CourseDescriptions in the DTD on p.15, we can edit it to match the example on p.16:
[begin correction]
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT CourseDescriptions (CourseDescription_Major | CourseDescription_Name | CourseDescription_Text | CourseDescription_Footnote)+>
<!ELEMENT CourseDescription_Major (#PCDATA)>
<!ELEMENT CourseDescription_Name (#PCDATA)>
<!ELEMENT CourseDescription_Text (#PCDATA)>
<!ELEMENT CourseDescription_Footnote (#PCDATA)>
<!ATTLIST CourseDescription_Footnote
type CDATA #REQUIRED
>
[end correction]
******************************
On p 17, I state that you can make your own DTD or not even use a DTD (there is no DTD declaration in the XML example on p.17). Suggested change on p.17 for the sentence above the XML example:
[begin correction]
This is the XML (without a DTD) that I imported into my placeholders for testing:
[end correction]
*******************************
There is a place in the book where I talk about the need for a wrapper element to make the repeating elements work, Table 3-2 and IF we created a DTD to model that structure, it would look like the original one on p.16. The paragraph on p.35 just above the tip should be changed to read:
[begin correction]
It seems that InDesign expects you will have a repeating type of content structure, identifiable by a ?wrapper? element that contains other elements. For example, the course descriptions content needs to have a <CourseDescription> element containing the name, description, and prerequisite content. Without the wrapper <CourseDescription> element, InDesign will not properly apply the ?clone? to the incoming XML when you select the Clone repeating text elements Option. (The DTD would have to be modified to add this CourseDescription level in the content model if you are using a DTD for validation.)
[end correction]
****************************
Lack of indentation in the XML samples on p. 37 makes this hard to compare to the DTD. It would be better if the XML samples were reformatted with the indents that represent the actual content hierarchy, as follows:
[begin correction]
<CourseDescriptions>
<metadata><creator>Hoskins</creator><createDate>03012007</createDate><note>used for table layout (table tagged as <CourseDescriptions>)</note><note>placeholder text is named with element names for clarity; paragraph style names may be different, so not using Map Tags to Styles with Map by Name checkbox.</note></metadata>
<CourseDescription_Major>Accounting</CourseDescription_Major>
<CourseDescription>
<CourseDescription_Name>ACC 101 Accounting Principles I 4 Credits</CourseDescription_Name>
<CourseDescription_Text>Basic principles of financial accounting for the business enterprise with emphasis on the valuation of business assets, measurement of net income, and double-entry techniques for recording transactions. Introduction to the cycle of accounting work, preparation of financial statements, and adjusting and closing procedures. Four class hours.</CourseDescription_Text>
<CourseDescription_Footnote type="prereq">Prerequisite: MTH 098 or MTH 130 or equivalent.</CourseDescription_Footnote>
</CourseDescription><!-- more ...-->
</CourseDescriptions>
XML example including metadata elements
Because the metadata tags do not match the placeholder elements that were set up, they can be excluded using the Import only elements that match structure Option. So the result should be only this in the imported XML:
<CourseDescriptions>
<CourseDescription_Major>Accounting</CourseDescription_Major>
<CourseDescription>
<CourseDescription_Name>ACC 101 Accounting Principles I 4 Credits</CourseDescription_Name>
<CourseDescription_Text>Basic principles of financial accounting for the business enterprise with emphasis on the valuation of business assets, measurement of net income, and double-entry techniques for recording transactions. Introduction to the cycle of accounting work, preparation of financial statements, and adjusting and closing procedures. Four class hours.</CourseDescription_Text>
<CourseDescription_Footnote type="prereq">Prerequisite: MTH 098 or MTH 130 or equivalent.</CourseDescription_Footnote>
</CourseDescription><!-- more ...-->
</CourseDescriptions>
[end correction]
*******************************
Iissue 2]
There are 'CourseDescription_Head' tag name at some places and figures. It might be unified to CourseDescription_Name.
A correction for p. 16 Figure 3-3 requires edited screen shot to replace the large text "CourseDescription_Head" with "CourseDescription_Name" to match the tag name
A correction for p. 23, the screenshot needs to be remade, with the XML on the right redone to change "CourseDescription_Head" to "CourseDescription_Name"
**************************
[Issue 3]
To bind TextFrame to CourseDescriptions element, I believe we have to change [Root] tag to [CourseDescriptions] before going step 1 on p.16. Furthermore, I think we should drag-and-drop element to TextFrame instead of using Tag palette.
The only correction that is required here, I think is:
p.16, top of page:
[begin correction]
1. Highlight the text frame and tag it with the corresponding root tag name "CourseDescriptions" found in the Tag palette.
[end correction]
****************************
p. 51 no change required
*****************************
p.63 the DTD here is consistent with the text which follows it. This DTD does not have to be consistent with other DTD examples or screenshots in the book. However, I think it would be better to change the XML example on p. 69:
[begin correction]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE CourseDescriptions SYSTEM "coursedescriptions.dtd">
<CourseDescriptions>
<CourseDescription_Major/>
<CourseDescription>
<CourseDescription_Name/>
<CourseDescription_Text/>
<CourseDescription_Footnote type="whatever"/>
</CourseDescription>
</CourseDescriptions>
[end correction]