Subject: [xsl] template mode - inheritable? - help From: "Jiang, Peiyun" <Peiyun.Jiang@xxxxxxxxxxxxxx> Date: Tue, 13 Jan 2004 11:53:07 -0400 |
XML: <doc> <a>texta<b>textb<c>textc</c></b></a> </doc> XSLT: <template match="doc" mode="m1"> <xsl:apply-templates /> </xsl:template> <template match="doc" mode="m2"> <xsl:apply-templates /> </xsl:template> <template match="a" mode="m1"> <xsl:apply-templates /> </xsl:template> <template match="a" mode="m2"> <xsl:apply-templates /> </xsl:template> <template match="b"> <xsl:apply-templates /> </xsl:template> <template match="c" mode="m1"> <xsl:apply-templates /> </xsl:template> <template match="c" mode="m2"> <xsl:apply-templates /> </xsl:template> PROCESSING and QUESTION: (1) When mode m1 for doc is matched and applied, will it apply mode m1 for element c? Notice that the parent of c is b and does not have a mode template. (2) If you have m1 and m2 for b, will m1 for doc select all m1 for its descedants? REAL Problem: I want situation (1): doc m1 process c m1 and doc m2 process c m2 when applied. Possible? Thanks. Peiyun XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] is there an easy way to r, David Carlisle | Thread | Re: [xsl] template mode - inheritab, David Carlisle |
Re: [xsl] Anyone can explain me thi, G. Ken Holman | Date | [xsl] Anyone can explain me this sy, Jaime Stuardo |
Month |