Subject: RE: [xsl] Default namespaces From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Tue, 12 Feb 2008 16:14:38 -0000 |
> I work with XBRL instance documents and frequently find the > following default namespace: > xmlns="http://www.xbrl.org/2003/instance" > > I have been removing it for processing with XSLT/XPath/XQuery > > Can anyone suggest another solution? Removing it isn't a solution, it's a hack. In XSLT 1.0, to refer to an element in a namespace, your stylesheet needs to bind a prefix to that namespace and you need to use a prefixed name to refer to the element. In XSLT 2.0, you can use xpath-default-namespace to declare the namespace that unprefixed element names in your path expressions (and match patterns) refer to. Google for "XSLT default namespace" for a zillion other messages saying the same thing. Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Default namespaces, Colin Paul Adams | Thread | [xsl] Re: xml->xml using xslt, Rose Rose |
Re: [xsl] Default namespaces, Colin Paul Adams | Date | Re: [xsl] Remove parent node for th, Martin Honnen |
Month |