[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re parsing element data generated by XSLT within the s

Subject: Re parsing element data generated by XSLT within the same stylesheet
From: "David A. Lee" <dlee@xxxxxxxxxxx>
Date: Tue, 29 Dec 2009 13:31:54 -0500
 Re parsing element data generated by XSLT within the s
I'm trying to learn XSLT (better). I'm working with an existing complicated stylesheet that I need to make changes to.
I have a working solution where I output the XSLT piped to XQuery (which I know better) but I'd like to do the whole thing in XSLT.

The basic concept/solution I'm looking for is: is it possible, and how, to re-process generated elements that are not in the source document.

Simplified example: suppose I have a template like this. Suppose I have LOTS of templates like these.

<xsl:template match="v3:renderMultiMedia/v3:caption">
<xsl:call-template name="styleCodeAttr">
<xsl:with-param name="styleCode" select="@styleCode"/>
<xsl:with-param name="additionalStyleCode"
<xsl:apply-templates select="@*[not(local-name(.)='styleCode')]"/>
<xsl:apply-templates mode="mixed" select="node()"/>



What I'd like to do is change every <p>XXX</p> into XXX&#10;

Obviously I can edit every template to change how it generates the
output XML, but I'm wondering is there a way to do this in XSLT by saying
"Re-parse the generated XML by this template".

Right now, as I mentioned, I'm doing this by piping the output into
XQuery where its a trivial thing to change the <p>,
in fact a 2nd pass of XSLT could just as trivially do it. But can it be
done within one invocation ?

Any clues on where to look (I have Mr. Kay's excellent book) appreciated.

Thank you.

David A. Lee
dlee@xxxxxxxxxxx http://www.calldei.com

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.