Subject: Re: [xsl] questions? From: "Christopher R. Maden" <crism@xxxxxxxxx> Date: Mon, 17 Sep 2001 21:58:25 -0700 |
If i have a operation like "insert node n as the i th child of node p" , what will be the the xsl?
for example <book> <author>P.G.Wodehouse</author> <name>Good Morning Jeeves</name> <price>20</price> </book>
if i add the node <review></review> as the 3rd child of book then the xsl will be
<book> <author>P.G.Wodehouse</author> <name>Good Morning Jeeves</name> <review>Some comments here</review> <price>20</price> </book>
<xsl:template match="book"> <xsl:copy select="."> <xsl:apply-templates select="*[position() < 3]"/> <review>Some comments here</review> <xsl:apply-templates select="*[position() >= 3]"/> </xsl:copy> </xsl:template>
[*] Frequently given answer. -- Christopher R. Maden, Principal Consultant, HMM Consulting Int'l, Inc. DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training <URL: http://www.hmmci.com/ > <URL: http://crism.maden.org/consulting/ > PGP Fingerprint: BBA6 4085 DED0 E176 D6D4 5DFC AC52 F825 AFEC 58DA
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] questions?, Mihir D. Gore | Thread | RE: [xsl] questions?, Mihir D. Gore |
Re: [xsl] Setting a base href in xs, John Hurst | Date | RE: [xsl] questions?, Mihir D. Gore |
Month |