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

Re: access the root element

Subject: Re: access the root element
From: JBryant@xxxxxxxxx
Date: Thu, 3 Nov 2005 11:24:20 -0600
Re:  access the root element
Hi, Kai,

One place to start learning about namespaces is the XSL FAQ. Here's a link
to the FAQ page on namespaces:
http://www.dpawson.co.uk/xsl/sect2/N5536.html

Here's a link to the top of the FAQ:
http://www.dpawson.co.uk/xsl/xslfaq.html

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)




"Kai Hackemesser" <kaha@xxxxxx>
11/03/2005 11:12 AM
Please respond to
xsl-list@xxxxxxxxxxxxxxxxxxxxxx


To
xsl-list@xxxxxxxxxxxxxxxxxxxxxx
cc

Subject
Re:  access the root element






Jon,
just one question is still open. If I would add this xmlns entry to my xsl
stylesheet without the 'm' qualifier, would I then be able to access the
"Metrics" element without the m: before? Or is it mandatory to have a
qualified namespace?

Regards,
Kai

> --- Urspr|ngliche Nachricht ---
> Von: Jon Gorman <jonathan.gorman@xxxxxxxxx>
> An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: Re:  access the root element
> Datum: Thu, 3 Nov 2005 11:00:47 -0600
>
> On 11/3/05, Kai Hackemesser <kaha@xxxxxx> wrote:
> > Jon,
> >
> > adding the namespace like Roman suuggested did work. But I have'nt
fully
> > understood yet, why.
>
> Well, you might want to google for some information on namespaces if
> you're not sure.  Think of namespaces as a qualifier for an element.
> So to distingish, say a dublin core element with the name "Subject"
> and an element in my own XML application "Subject" I could associate
> each with a namespace.
>
> The xmlns="http://metrics.sourceforge.net/2003/Metrics-First-Flat" is
> putting all the that element and all the descendent elements in that
> doc into that namespace.  XSLT assumes that when you try to match
> something like Metrics, you're look for unquaified elements named
> Metrics.  But what you really want to look for are qualified elements
> named Metrics.  To indicate in the XPATH that the name Metrics is in
> the proper namespace you prefix it with the m, which in the beginning
> of the document is assoicated with that namespace.
>
> Hopefully I haven't made it any more confusing, but that's the
> shortest description I can give.  Using google will more than likely
> turn up much better descriptions.  (Or you could go to www.w3.org and
> read the specs.)
>
> Jon Gorman

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.