[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] transforming xml with namespace with no prefix
Subject: RE: [xsl] transforming xml with namespace with no prefix
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 29 Jan 2008 18:13:15 -0000
|
> <doc xmlns="http://rtf2xml.sourceforge.net/">
>
> Not until I manually remove the namespace declaration can I
> get basic templates to work. Is there a line I can place in
> a stylesheet that will allow me to transform such xml documents?
Yes, in XSLT 2.0: xpath-default-namespace="http://rtf2xml.sourceforge.net/"
In XSLT 1.0 you need to bind a prefix to this namespace and use it in all
path expressions and match patterns that refer to the namespace.
Michael Kay
http://www.saxonica.com/
|