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

B

bouton

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top