Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: mixed content processing with xsl

From: "swapna guddanti [MSFT]" <swapnag@---------.------.--->
To: NULL
Date: 6/1/2005 11:49:00 AM
your XPath expression is
a:document/content/*/text

does your input xml document have the prefix on all the elements. This 
expression will return null since the 'text' elements are not in the 
namespace "a".

try using
a:document/a:content//a:text

Also, you can omit the * for descendants.


thanks,
swapna



"the_Jackal" <presley.david@g...> wrote in message 
news:1117516679.874942.303750@f......
> my schema captures all the necesary content when exporting from MS-Word
> (using true XML)
>
> from XSL - i have the same sort of thing using the "*" for headings and
> its fine
> the schema allows for mixed content also in the content element
>
>
> ** XML **
> <text>the lazy <text_bold>cow</text_bold> got eaten by a hungry
> <text_italic>fox</text_italic></text>
>
> ** XSL **
> ---
> <xsl:template match="a:document/content/*/text">
> <p><xsl:value-of select="node()"/></p>
> </xsl:template>
>
> <xsl:template match="a:document/content/*/text_bold">
> <strong><xsl:value-of select="node()"/></strong> <!-- bold -->
> </xsl:template>
>
> <xsl:template match="a:document/content/*/text_italic"> <!-- italic -->
> <em><xsl:value-of select="node()"/></em>
> </xsl:template>
> 




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