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

Namespace Appearing for No Obvious Reason: What Could

Subject: Namespace Appearing for No Obvious Reason: What Could Cause It?
From: "Eliot Kimber ekimber@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 4 Mar 2015 17:36:44 -0000
 Namespace Appearing for No Obvious Reason: What Could
I am generating HTML from a fairly complex transform made of many modules.
These modules declare a number of namespaces that apply to different
function packages, module-specific named templates and modes, etc., but
*not* to either the input elements or result elements (other than possible
an XHTML namespace). I have checked and all of these namespaces are
accounted for in the exclude-result-prefixes declarations for all the
modules involved.

In my transform I'm calling this template, which then applies the
following template:

<xsl:template name="generateMetaBrand">
  <xsl:apply-templates select="." mode="generateMetaBrand"/>
    </xsl:template>

    <xsl:template match="*" mode="generateMetaBrand">
  <meta name="brand" content="XXXX"/>
  <xsl:value-of select="$newline"/>
    </xsl:template>

The resulting element has an unwanted namespace declaration:


<meta xmlns:df="http://dita2indesign.org/dita/functions" name="brand"
content="XXXX"></meta>

The namespace in question is associated with functions and nothing else.
The namespace is only declared on <xsl:stylesheet> elements and the prefix
is not used on any start tag.

I can't think of anything that would cause this namespace, and only this
namespace (out of the several that are declared on each stylesheet), to be
output in the HTML.

What could cause this sort of rogue namespace declaration? The variable in
my style sheet appears to be the fact that I'm calling a named template in
one module that is declared in a different module. The exact same result
element generation code put into a normal template context does not have
the namespace node (as you would expect).

So this must be some subtlety about namespace declaration at the XSLT
module level, but I have no idea what it might be. I don't remember every
seeing this issue before and I've made pretty much every mistake one can
make in an XSLT 2 transform.

Thanks,

Eliot
bbbbb
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.