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

Re: XML Public Indentifier

  • From: Mike Moran <mmoran@n...>
  • To: Nicolas LEHUEN <nicolas.lehuen@u...>
  • Date: Wed, 05 Sep 2001 13:39:22 +0100

xml public id
Nicolas LEHUEN wrote:

> Should we coalesce this thread with the one about URN for namespaces ? Isn't
> there a similarity between a DTD PUBLIC id and a namespace URN ?


Well, you can set the default namespace *within* the DTD, which may be
resolved from the PUBLIC id.

I just got caught with this using XPath in XSLT, when I was matching on 
some html. It worked as long as the DOCTYPE was not defined. This is 
because the the XHTML DTD (which was found via the SYSTEM url) defines a 
default namespace, as if you'd done <html xmlns="http://foo..."> in the 
source html document. XPath in XSLT without a namespace qualifier won't 
match the default namespace, so you have to locate the DTD, do a search 
for "xmlns" in it, define that namespace in your XSLT and then use the 
namespace in your XPath.

I'm sure you all know this, but I just thought I'd provide it as another 
possible example of the problems with default namespaces.

--
Mike



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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.