Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: simple xsl question simple xsl questionTo: NULL Date: 7/20/2008 1:46:00 AM Hi,
I'm learning xsl and am encountering an unexpected result with the
xml / xsl below
The xsl result includes text from the printsettings nodes: "1none",
and since this was not included in the select attribute.
It's strange that the unspecified node is the first node of the
document. I've simplified the xml document to remove other nodes, but
when those nodes were present it was still only the first node that
had it's text printed out.
If you have any idea why the text of the printsettings nodes is being
printed I'd appreciate hearing the explanation.
I'm using Microsofts XMLNotepad to view the output
Thank you,
Rod
<?xml version="1.0" encoding="utf-8"?>
<template>
<printsettings>
<orientation>1</orientation>
<header>none</header>
</printsettings>
<columns>
<colrange name="C1">
<coldimspecs>
<coldimspec >
<memberspecs>
<memberspec />
</memberspecs>
</coldimspec>
<coldimspec dimensionname="Scenario" >
<memberspecs>
<memberspec memberkey="" />
</memberspecs>
</coldimspec>
</coldimspecs>
</colrange>
<colrange name="C2">
<coldimspecs>
<coldimspec >
<memberspecs>
<memberspec />
</memberspecs>
</coldimspec>
<coldimspec dimensionname="Scenario" >
<memberspecs>
<memberspec memberkey="" />
</memberspecs>
</coldimspec>
</coldimspecs>
</colrange>
</columns>
</template>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform">
<xsl:template match="/">
<HTML>
<BODY>
<xsl:apply-templates/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="columns/colrange">
<TABLE BORDER="1" width="40%" >
<TR>
<xsl:value-of select="local-name()"/>
<xsl:text>: </xsl:text> <xsl:value-of select="@name"/>
<xsl:text> </xsl:text> <xsl:value-of select="@description"/>
<xsl:for-each select="*/*/*/*">
<TD>
<xsl:value-of select="local-name()"/>
</TD>
</xsl:for-each>
</TR>
</TABLE>
</xsl:template>
</xsl:stylesheet>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
