Subject: RE: [xsl] Applying templates to a mixed content node From: "Michael Kay" <mhk@xxxxxxxxx> Date: Wed, 17 Sep 2003 04:43:10 +0100 |
Your code looks perfectly OK to me. Which means either I'm missing something, or the problem is not in the bit of code that you've shown us. Michael Kay > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Ryan Graham > Sent: 16 September 2003 21:26 > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] Applying templates to a 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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Applying templates to a mixed, Ryan Graham | Thread | RE: [xsl] Applying templates to a m, Passin, Tom |
RE: [xsl] Does the size of XML affe, Michael Kay | Date | RE: [xsl] Problem relocating nodes , Michael Kay |
Month |