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

Re: FW: XML transformation using XALAN

Subject: Re: FW: XML transformation using XALAN
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 25 Apr 2002 11:36:03 +0100
xalan nonamespaceschemalocation
> What should I use to specify that the schema lies locally in the same
> directory with the
> name POSchema.xsd?
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <POS xmlns="?">

It is explict in the namespaces rec that it is not a goal of namespaces
in general, or xmlns= in particular, to refer to a schema. (Although
unfortunately the schema spec does allow that as a fallback option).

By adding xmlns="anything" to your document you are changing the name of
every element in the document from having no namespace component to
having namespace name "anything". Note it is the literal string of
characters in the xmlns="" that is the namespace name, that string
does not have to refer to any actual file anywhere.
having changed the name of your elements your XPath expressions no
longer match.

If you want to refer to a schema without placing all your elements in a
different namespace, write the schema so that it specifies unnamespaced
elements and then use xsi:noNamespaceSchemaLocation="POSchema.xsd" where
xsi: prefix is declared to be the schema instance namespace as specified
in the schema docs.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.