Subject: Re: How to change namespace prefixes in a import file hierarchy? Or at least append som pattern?
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Tue, 05 Jan 2010 17:08:45 +0100
|
Ben Stover wrote:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
But got the following compiling errors:
Saxon 9.1.0.7J from Saxonica
Java version 1.5.0_06
Error at xsl:template on line 18 column 46 of renameNamespacesKay.xsl:
XPST0081: XSLT Pattern syntax error at char 13 on line 18 in {attribute(*, xs:QName)}:
Undeclared namespace prefix {xs}
Error at xsl:attribute on line 19 column 177 of renameNamespacesKay.xsl:
XPST0017: XPath syntax error at char 36 on line 19 in {...ix-from-QName(.) = 'oldpref...}:
Unknown system function get-prefix-from-QName()
Failed to compile stylesheet. 2 errors detected.
XSLT run finished
Simply add
xmlns:xs="http://www.w3.org/2001/XMLSchema"
to the xsl:stylesheet element so that the prefix 'xs' is defined as the
schema namespace.
--
Martin Honnen
http://msmvps.com/blogs/martin_honnen/
|