[Home] [By Thread] [By Date] [Recent Entries]

  • To: "Xml-Dev" <xml-dev@l...>
  • Subject: XSLT and default namespaces
  • From: "Paul Spencer" <xml-dev@b...>
  • Date: Fri, 29 Aug 2003 15:16:04 +0100
  • Importance: Normal

XSLT's handling of namespaces seems to be the bane of my life.

I am writing a stylesheet to create a partially populated QA template for
schemas. I need to be able to extract the default namespace from the
xs:schema element. This typically looks like:

<xs:schema
	targetNamespace="example.com"
	xmlns="example.com"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	elementFormDefault="qualified"
	attributeFormDefault="unqualified">

Or at least, a good one does. Is it possible to extract the value of the
default namespace when the element to which it is attached is in another
namespace (as here)? I am using XSLT 1.0.

Regards

Paul Spencer
Boynings Consulting Ltd
http://www.boynings.co.uk


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member