0

I'm making product sheets for our products. I have product data in xml like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
    <product>
        <name>Item A</name>
        <properties>
            <property> 
                <type>Color</type>
                <value>Red</value>
            </property>
            <property> 
                <type>Size</type>
                <value>50x50x50 mm</value>
            </property>
        </properties>
    </product>
    <product>
        <name>Item B</name>
        <properties>
            <property> 
                <type>Color</type>
                <value>Green</value>
            </property>
            <property> 
                <type>Size</type>
                <value>50x50x50 mm</value>
            </property>
        </properties>
    </product>
    <product>
        <name>Item C</name>
        <properties>
            <property> 
                <type>Color</type>
                <value>Brown</value>
            </property>
            <property> 
                <type>Size</type>
                <value>50x50x50 mm</value>
            </property>
            <property> 
                <type>Inputs</type>
                <value>3</value>
            </property>
        </properties>
    </product>
</root>

I would like to present the properties in a table. Different products have different properties and different number of properties. Can I make the number of rows dynamic with conditions? I would like to populate the table with properties: First column with type and second with value.

/Fredrik

1 Answers1

0

Dealing with tables while importing XML is all but a nice ballad along the sea. You have to use a "table" syntax that InDesign can convert to a native table. Actually you can choose CALS syntax. A kind of outdated format that will prevent you from using images within those tables. The alternative is to use the InDesign table syntax set by a specific namespace. You will find nice samples here : http://www.indesignusergroup.com/chapters/sydney/files/635/Sydney_XML_Handout.pdf

Loic
  • 2,173
  • 10
  • 13