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

Re: How to change namespace prefixes in a import file

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
Re:  How to change namespace prefixes in a import file
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/

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.