Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > using multiple xml sources but getting too much output via xsl.

Reply
Thread Tools

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

 
 
bouton
Guest
Posts: n/a
 
      09-22-2005
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"
xmlnssl="http://www.w3.org/1999/XSL/Transform">
<xslutput 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Too Much Talent + Too Much Demand = ? Lawrence D'Oliveiro NZ Computing 5 02-18-2011 10:14 PM
How much image manipulation is too much? Rich Digital Photography 30 03-19-2006 08:52 AM
Simulation questions...how much is too much? =?Utf-8?B?VGlwcHk=?= Microsoft Certification 0 04-16-2005 04:47 AM
CPU Heat--how much is too much? PowerPost2000 Computer Support 4 12-22-2003 12:40 AM
paranoia... much too much adcl Computer Support 14 11-08-2003 05:18 PM



Advertisments