using multiple xml sources but getting too much output via xsl.

Discussion in 'XML' started by bouton, Sep 22, 2005.

  1. bouton

    bouton Guest

    I am trying to 'union' multiple xml files into one html table with only
    a few of the many fields/elements displayed using xsl.

    I have index.xml which lists the documents, all of which validate with
    the same .xsd

    <?xml version="1.0"?>
    <index>
    <title>My List</title>
    <entry>1111</entry>
    <entry>2222</entry>
    <entry>3333</entry>
    </index>

    the xsl file is this

    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:eek:utput method="html"/>
    <xsl:template match="index">
    <html>
    <head>
    <title><xsl:value-of select="title"/></title>
    </head>
    <table border="1">
    <tr>
    <th colspan="13"><xsl:value-of select="title"/></th>
    </tr>
    <tr valign="top">
    <th>local name</th>
    <th>Scheme</th>
    </tr>

    <xsl:apply-templates/>

    </table>
    </html>
    </xsl:template>

    <xsl:template match="entry">
    <tr valign="top">
    <td><xsl:apply-templates select="document(concat(.,'.xml'))"/></td>
    </tr>
    </xsl:template>

    <xsl:template match="Information/localName">
    <td><xsl:value-of select="//Information//localName"/></td>
    </xsl:template>

    <xsl:template match="scheme">
    <td><xsl:value-of
    select="//Configuration/Properties//scheme"/></td>
    </xsl:template>

    </xsl:stylesheet>

    I get the table I expect/want - but above it I get a complete listing
    of the ALL the xml unformatted.

    I know its probably a misplaced apply-template - but I can't figure it
    out.
    Suggestions?
    thanks
     
    bouton, Sep 22, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SB
    Replies:
    0
    Views:
    397
  2. Claude
    Replies:
    0
    Views:
    367
    Claude
    Mar 7, 2004
  3. cpp4ever
    Replies:
    3
    Views:
    398
    Francesco
    Sep 8, 2009
  4. Richard Maher
    Replies:
    9
    Views:
    752
    Richard Maher
    Mar 8, 2010
  5. Richard Maher

    FF3.6 Stack output from Too Much Recursion

    Richard Maher, Mar 1, 2010, in forum: Javascript
    Replies:
    13
    Views:
    278
    Richard Maher
    Mar 8, 2010
Loading...

Share This Page