[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Applying templates to a mixed content node

Subject: Applying templates to a mixed content node
From: Ryan Graham <Ryan.Graham@xxxxxxxxxxxxx>
Date: Tue, 16 Sep 2003 13:26:02 -0700
xpath mixed content node
Hi,

I have the following source XML (which is formed somewhat awkwardly):

<p>Some text for the p tag.
	<tabular>
		<table>
		...
		</table>
	</tabular>
</p>

Note that <p> contains both text and other children elements.
In processing, I would like to write the p/text() node to an FO block, and
then continue to process the <tabular> node with templates.  These xpath
expressions seem evaluate correctly, but the processor never processes the
<tabular> node:

<xsl:template match="p">
	<xsl:if test="./tabular">
		<fo:block xsl:use-attribute-sets="para">
			<xsl:value-of select="./text()" />
		</fo:block>
		<xsl:apply-templates select="tabular"/>
	</xsl:if>
	<fo:block xsl:use-attribute-sets="para">
		<xsl:apply-templates />
	</fo:block>
</xsl:template>

Any suggestions on how to make the processor recognize that <p> contains a
<tabular> before processing the node?

Thanks so much,
Ryan

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.