Subject: Re: [xsl] import entire tags From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Sat, 18 Jan 2003 02:08:22 +0100 |
The page source looks now like this: ... <option xmlns:xspdoc="http://apache.org/cocoon/XSPDoc/v1" xmlns:esql ="http://apache.org/cocoon/SQL/v2" xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0" value ="17">blabla</option>
Is there a simple way (I mean "short code") to avoid this kind of output?
xsl:copy-of unconditionally copies namespace nodes. You try to can avoid this by using element constructors instead of copying: <xsl:template match="*"> <xsl:element name="name()" namespace="namespace-uri()"> <xsl:copy-of select="@*"> <xsl:apply-templates/> </xsl:element> </xsl:template> Beware, untested, check against the spec before use. You can omit the namespace bit if your elements are always in the default namespace.
You can try to merge the stuff above somehow into your existing transformation, or use it as a separate filter transformation in the pipeline. Either way costs performance. Another way would be to write a simple customized transformation stripping superflous namespaces directly from the SAX events. There are examples of similar transformers in the Cocoon distribution (somewhere, well hidden). This should be the most performant solution.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] import entire tags, Johannes . Becker | Thread | RE: [xsl] calling extension java fu, Cams Ismael |
[xsl] Problem with parameter proces, Jaywanth | Date | Re: [xsl] how to "save" a context?, S Woodside |
Month |