[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
At 11:21 AM 12/29/2006, you wrote:
This is standard practice -- but in XSLT 2.0, not 1.0. (I think you meant 'phase-2-output' in the xsl:copy-of, not phase-8.)
It's possible only in XSLT 1.0 if an extension function is available to turn the results of applying templates in phase 1 into a node set, which can be offered as input to the templates in phase 2.
I am unaware whether Xalan-C (the OP's processor) offers this extension function, which is commonly called node-set().
Re: [xsl] Managing cross references when combining XML files into one document
Subject: Re: [xsl] Managing cross references when combining XML files into one document From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 29 Dec 2006 13:21:29 -0500 |
At 11:21 AM 12/29/2006, you wrote:
You can try to break the processing into stages by using something simple such as:
<!-- source: Michael Kay (I think) --> <xsl:variable name="phase-1-output"> <xsl:apply-templates select="/" mode="phase-1"/> </xsl:variable>
<xsl:variable name="phase-2-output"> <xsl:apply-templates select="$phase-1-output" mode="phase-2"/> </xsl:variable>
<xsl:template match="/"> <xsl:copy-of select="$phase-8-output"/> </xsl:template>
This is standard practice -- but in XSLT 2.0, not 1.0. (I think you meant 'phase-2-output' in the xsl:copy-of, not phase-8.)
It's possible only in XSLT 1.0 if an extension function is available to turn the results of applying templates in phase 1 into a node set, which can be offered as input to the templates in phase 2.
I am unaware whether Xalan-C (the OP's processor) offers this extension function, which is commonly called node-set().
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Managing cross references, Eric Larson | Thread | [xsl] Cosmetic sorting, Harry Liljeström |
RE: [xsl] Default namespace matchin, Michael Kay | Date | Re: [xsl] Default namespace matchin, Wendell Piez |
Month |