cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e nio <>
Subject RE: exp + esql tags and attributes - where I can find these?
Date Mon, 07 Apr 2003 06:53:20 GMT
  Thanks for the tip. I have looked at xsp.xsl and kind of got
the idea how it generates the source.  My goal
is to remove the namespace written out on the xml output. The
solution posted on wiki and cocoon tutorial did not solve this
problem using exclude-result-prefixes="xsp esql" as an attribute
of <xsl:stylesheet>.  Now looking at xsp.xsl the following lines
is the area where it copies the namespaces from the *.xsp

    269     <!-- Declare namespace defined by @uri and @prefix
attribute -->
    270     <xsl:if test="$uri != '&quot;&quot;'">
    271       <xsl:if
test="not($parent-element/namespace::*[local-name(.) = $pr
efix and string(.) = $uri])">
    272         this.contentHandler.startPrefixMapping(
    273           <xsl:value-of select="$prefix"/>,
    274           <xsl:value-of select="$uri"/>);
    275       </xsl:if>
    276       <xsl:for-each
select="$parent-element/namespace::*[local-name(.) =
 $prefix and string(.) = $uri]">
    277       </xsl:for-each>
    278     </xsl:if>
    280     <xsl:apply-templates select="xsp:attribute |
    282     this.contentHandler.startElement(
    283       <xsl:copy-of select="$uri"/>,
    284       <xsl:copy-of select="$name"/>,
    285       <xsl:copy-of select="$raw-name"/>,
    286       xspAttr
    287     );          

What happens if these were removed? ie the
this.contentHandler.startPrefixMapping(..) ? Will the
XSPGenerator would still work? My thoughts are that
contentHandler is just for the SAX parser to tell it came across
a node and it will serialize it to the output, but once it is
outputted does the XSPGenerator java code still need this
namespaces to process the xml or not anymore other than passing
it along to the final output?  My reason for wanting to remove
it is to get rid of namespaces attributes in the output xml.
I tried the extra transform too but not successful in removing
the namespaces attributes.

--- Geoff Howard <> wrote:
> the ultimate reference is in xsp.xsl and esql.xsl - if I
> remember right, 
> they're in the jar in the binary dist, and in src/java in the
> src dist - 
> exact location depends on version.
> Geoff

Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message