Atomik Xport SE: Reference > Chapter 10 Working With DTDs << >>

10.5 Element attributes

Atomik Xport has the ability to extract specific attributes for any element whose content model includes text (#PCDATA). These attributes, if declared for elements in your DTD, will be added into the XML during extraction. The full list of available attributes is as follows.

Attribute Name  Description 
pagenum  Displayed page number in InDesign 
apagenum  Absolute page number in InDesign 
align  Alignment of text paragraphs. Alignment of table cells in both native and tabbed tables. 
docname  Name of InDesign document 
ncol  Number of columns in text box 
colour  Colour of text box 
shade  Shade percentage of text box 
font  Font name 
fontsize  Font size in points 
languageID  Paragraph languageID 
language  Paragraph language 
boxid  BoxID (internal InDesign Box number) 
boxname  Box Name 
parastyle or pstyle  Paragraph style name 
charstyle or cstyle  Character style name 
bold  Indicates if the first character of the element has bold applied to it (denoted as 0 or 1, e.g. bold=1 for positive) 
italic  Indicates if the first character of the element has italic applied to it (denoted as 0 or 1, e.g. italic=1 for positive) 
underline  Indicates if the first character of the element has underline applied to it (denoted as 0 or 1, e.g. underline=1 for positive) 
outline  Indicates if the first character of the element has outline applied to it (denoted as 0 or 1, e.g. outline=1 for positive) 
superscript  Indicates if the first character of the element has superscript applied to it (denoted as 0 or 1, e.g. superscript=1 for positive) 
subscript  Indicates if the first character of the element has subscript applied to it (denoted as 0 or 1, e.g. subscript=1 for positive) 
superior  Indicates if the first character of the element has superior applied to it (denoted as 0 or 1, e.g. superior=1 for positive) 
strikethru  Indicates if the first character of the element has strikethru applied to it (denoted as 0 or 1, e.g. strikethru=1 for positive) 
allcaps  Indicates if the first character of the element has allcaps applied to it (denoted as 0 or 1, e.g. allcaps=1 for positive) 
smallcaps  Indicates if the first character of the element has smallcaps applied to it (denoted as 0 or 1, e.g. smallcaps=1 for positive) 
wunderline  Indicates if the first character of the element has wunderline applied to it (denoted as 0 or 1, e.g. wunderline=1 for positive) 

To have any of these attributes included in the extracted XML you must declare them for your DTD elements. Here is an example DTD which includes some of the above attributes:

<!ELEMENT Article (Headline, Standfirst?, BodyText)> 
<!ELEMENT Headline (#PCDATA)>
<!ATTLIST Headline
pagenum CDATA #IMPLIED
docname CDATA #IMPLIED
ncol CDATA #IMPLIED
colour CDATA #IMPLIED
bold CDATA #IMPLIED
italic CDATA #IMPLIED
shade CDATA #IMPLIED>
<!ELEMENT Standfirst (#PCDATA)>
<!ELEMENT BodyText (Paragraph)+>
<!ELEMENT Paragraph (#PCDATA)>

If you used an attribute list like this in your DTD, the resulting XML for a Headline element might look as follows:

<Headline pagenum=”7” docname=”Alice023.qxd” ncol=”1” colour=”Blue” bold=”0” italic=”0” shade=”80”>Wonderland is the place to be.</Headline> 

So for this piece of content we now know that the headline came from page 7 of the InDesign document ‘Alice023.qxd, the text box it was in had 1 column, used the colour ‘Blue’ at 80% shading and the headline did not have either bold or italic applied to it.

In the example above we only included these attributes in the Headline element. You can declare any combination of these attributes in your DTDs for any number of elements.