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

Re: Namespaces

Subject: Re: Namespaces
From: David Totten <xsl@xxxxxxxxxxxxxx>
Date: Tue, 10 Jun 2003 07:37:56 -0400
download the elsevier dtd
Thank you David, this works, and your explanation helped me to
understand this alot better. I appreciate your help.

David Totten

On Tue, Jun 10, 2003 at 12:07:52PM +0100, David Carlisle wrote:
> 
> > Anyway, the dtd is here:
> 
> wherein we find:
> 
> <!ENTITY % ESJA.xmlns       "'http://www.elsevier.com/xml/ja/dtd'" >
> 
> <!ENTITY % top-level.att
>                "xmlns           CDATA               #FIXED  %ESJA.xmlns;
> 
> which means that every element is in http://www.elsevier.com/xml/ja/dtd
> (or at least i assume that applies to every element, I didn't actually
> read much of the dtd)
> 
> Assuming that's right it means that a source element that looks like
> <title>
> is really
> <title xmlns="http://www.elsevier.com/xml/ja/dtd">
> which means that a match of "title" or a select of /foo/bar/title
> will not find it, as they are looking for no-namespace.
>  you need on teh xsl:stylesheet element
> 
> xmlns:e="http://www.elsevier.com/xml/ja/dtd"
> 
> (or any other prefix that is free if e: is taken)
> 
> then have
> 
> match="e:title"
> select="/e:foo/e:/bar/e:/title"
> etc.
> 
> In XPath 1 you have to prefix any elements in a namespace.
> 
> Xpath/xslt2 drafts  allow you to say that the default namespace for
> Xpath is "http://www.elsevier.com/xml/ja/dtd" then your original would
> work, but XSLT2 is not yet a done deal.
> 
> David
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 

 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.