Hi,
I have a problem with one of my XSLT steps that gives this error:
Cannot output a namespace node for the default namespace when the
element is in no namespace.
So I tried to debug it by calling file-serializer for the input
document. To my surprise, doing this XSLT step in a test pipeline
with this saved input document worked fine: it did its job without
giving any error.
Then I changed my main pipeline to use this saved static file i.s.o.
the internal document ... and that worked too! So there seems to
be a difference between passing an internal document (id/href) and
using a static file previously saved with file-serializer.
About the problem itself: the input document sets a default namespace,
someling like:
<batchResponse xmlns="urn:oasis:names:tc:DSML:2:0:core"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
....
</batchResponse>
and my stylesheet just adds an attribute to specific nodes:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0"
xmlns:dsml="urn:oasis:names:tc:DSML:2:0:core">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="*">
<xsl:copy>
<xsl:for-each select="@*">
<xsl:copy-of select="."/>
</xsl:for-each>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="//dsml:searchResultEntry">
<xsl:copy>
<xsl:for-each select="@*">
<xsl:copy-of select="."/>
</xsl:for-each>
<xsl:attribute name="dnid">
<xsl:value-of select="generate-id(.)"/>
</xsl:attribute>
<xsl:copy-of select="*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Whether this is the best method is another story, but this works
for the serialized input file, but gives the error mentioned
above when passing the document internally.
I'm confused... can someone tell me how to debug this to solve
the problem?
Thanks,
--
-- Jos Vos <[EMAIL PROTECTED]>
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user