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

Re: Namespaces on attributes

Subject: Re: Namespaces on attributes
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 29 Feb 2012 17:15:11 +0000
Re:  Namespaces on attributes
On 29/02/2012 16:45, Wendell Piez wrote:
Hi,

It was recently shown to me that (using a recent Saxon) this template

<xsl:template match="@schemaLocation"
  xpath-default-namespace="http://www.w3.org/2001/XMLSchema-instance"/>

does not match the @xsi:schemaLocation here:

<ead xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="urn:isbn:1-931666-22-9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:isbn:1-931666-22-9 http://www.loc.gov/ead/ead.xsd">


I am at a loss to explain this.

It took me a while too.

xpath-default-namespace sets the "default namespace for element and type names". It doesn't affect attribute names. As in XML, unprefixed attribute names are in no namespace, regardless of any default namespace.

Michael Kay
Saxonica

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.