xsl-list
[Top] [All Lists]

RE: [xsl] Default namespaces

2008-02-12 09:15:16
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/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>