Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: simple xsl question

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 7/20/2008 1:08:00 PM

vanSkier wrote:

> The xsl result includes text from the printsettings nodes:  "1none",
> and since this was not included in the select attribute.

> <xsl:template match="/">
> <HTML>
> <BODY>
>     <xsl:apply-templates/>


Here you process the child nodes of the root node so in your sample XML 
then 'template' element is processed by a matching template. As you have 
not provided one yourself the default template is used which processes 
all child nodes of the context node, in that case the 'printsettings' 
element and the 'columns' element. As you have not provided a matching 
template for 'printsettings' yourself the default tempate is used and 
that way, you end up with the text contents of child elements output to 
the result tree.
To fix that, use
       <xsl:apply-templates select="template/columns/colrange"/>
above, instead of the <xsl:apply-templates/> that you have.




-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent