Subject: [xsl] matching positional nodes From: Spencer Tickner <spencertickner@xxxxxxxxx> Date: Thu, 7 Jul 2005 08:48:48 -0800 |
Hi Everyone, thanks in advance for the help. I am translating from xml to xml. Original (just a snippet) <section><bold>1</bold>This is a section with <bold>text</bold></section> What I need <section> <sectionnumber>1</sectionnumber> <sectiontext>This is a section with <bold>text</bold></sectiontext> </section> What I've tried <xsl:template match="section"> <section> <sectionnumber><xsl:apply-templates select="BOLD[1]"/></sectionnumber> <sectiontext><xsl:apply-templates select="*[not(BOLD[1])]"/></sectiontext> </section> </xsl:template> So far what I'm getting as output is <section> <sectionnumber>1</sectionnumber> <sectiontext>1text</sectiontext> </section> Pretty close but not quite there. Anyone have any ideas on that apply-template select? Thanks a lot, Spencer
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] RE: Saxon versus Xalan im, Michael Kay | Thread | Re: [xsl] matching positional nodes, Mukul Gandhi |
Re: [xsl] pre-processing of child e, David Carlisle | Date | Re: [xsl] matching positional nodes, Mukul Gandhi |
Month |