D
doulos05
Ok, I'm sure the answer is right in front of me, but I can't see if
for the life of me. Here's my xml document:
<price_guide>
<group><name>Wacky Widgets</name>
<product>
<product_id>1</product_id>
<description>Widget 1</description>
<sell>
<quantity>500</quantity>
<price>25.50</qunatity>
</sell>
<sell>
<quantity>1000</quantity>
<price>34.20</price>
</sell>
</product>
<!-- Multiple producst here-->
</group>
<group><name>Cool Computers</name>
<product>
<product_id>2</product_id>
<description>Computer 1</description>
<sell>
<quantity>500</quantity>
<price>50.43</price>
</sell>
<sell>
<quantity>1000</quantity>
<price>83.10</price>
</sell>
<sell>
<quantity>2500</quantity>
<price>160.76</price>
</sell>
</product>
</group>
</price_guide>
Now, I want a stylesheet that takes each group and puts it in a
separate HTML table with the Name as an <h2> header and Product ID,
Description, and each quantity as a Column header. Apparently there
are too many "for-each" loops in this for my small brain to handle.
What I'm getting is that is makes a table for each group containing
every product in every group, rather than every product in that
particular group. What do I need to do this without having to say /
product_guide/group[n]/product every time?
for the life of me. Here's my xml document:
<price_guide>
<group><name>Wacky Widgets</name>
<product>
<product_id>1</product_id>
<description>Widget 1</description>
<sell>
<quantity>500</quantity>
<price>25.50</qunatity>
</sell>
<sell>
<quantity>1000</quantity>
<price>34.20</price>
</sell>
</product>
<!-- Multiple producst here-->
</group>
<group><name>Cool Computers</name>
<product>
<product_id>2</product_id>
<description>Computer 1</description>
<sell>
<quantity>500</quantity>
<price>50.43</price>
</sell>
<sell>
<quantity>1000</quantity>
<price>83.10</price>
</sell>
<sell>
<quantity>2500</quantity>
<price>160.76</price>
</sell>
</product>
</group>
</price_guide>
Now, I want a stylesheet that takes each group and puts it in a
separate HTML table with the Name as an <h2> header and Product ID,
Description, and each quantity as a Column header. Apparently there
are too many "for-each" loops in this for my small brain to handle.
What I'm getting is that is makes a table for each group containing
every product in every group, rather than every product in that
particular group. What do I need to do this without having to say /
product_guide/group[n]/product every time?