Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 8th, 2009, 05:15 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 119
Thanks: 25
Thanked 3 Times in 3 Posts
Default AID XML to html table

If I have the following input xml and I want to ouput a standard html table with number of rows equal to aid:trows and number of columns equal to aid:tcols how would I do it? Just standard html with table tr td tags

Code:
<?xml version="1.0" encoding="UTF-8"?>
<Table xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" aid:table="table"
    aid:trows="2" aid:tcols="3" summary="NOCHANGE">
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="184"
        larghezza="33%">
        <_B>
            <img_html href="file://./NOME_1.eps" proporzione_x="31"
                id="50211557" proporzione_h="32" proporzione_w="32"
                alkusetype="3"/>
        </_B>
    </Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="184"
        larghezza="33%">
        <_centro>
            <img_html href="file://./LUNGHEZZA_1.eps" proporzione_x="31"
                id="50211532" proporzione_h="34" proporzione_w="55"
                alkusetype="3"/>
        </_centro>
    </Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="184"
        larghezza="33%">
        <img_html href="file://./TIPO_1.eps" proporzione_x="31" id="50211586"
            proporzione_h="78" proporzione_w="79" alkusetype="3"/>
    </Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="184"
        larghezza="33%">12613</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="184"
        larghezza="33%">130</Cell>
    <Cell aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="184"
        larghezza="33%">ø25 - 1&quot;3/8&quot; Z6</Cell>
</Table>
I tried doing a for-each loop from 1 to aid:trows to output the correct number of tr tags but then I can't select any elements inside this as the context node is an atomic.

Do I have to use recursion?

Any suggestions would be great. Thank you.
 
Old March 8th, 2009, 09:15 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 119
Thanks: 25
Thanked 3 Times in 3 Posts
Default

I figured it out Thanks anyway





Similar Threads
Thread Thread Starter Forum Replies Last Post
transform a xml to a html table robert_trudel_fr XSLT 3 December 3rd, 2006 02:16 PM
constructing a HTML table from xml data using xslt rameshnarayan XSLT 0 September 19th, 2005 06:53 AM
XML to HTML Table with Sorting and Distinct VictorMk XSLT 4 April 23rd, 2004 06:29 PM
XML List -> HTML table JPMRaptor XSLT 1 November 14th, 2003 10:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.