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

Re: Matching namespaces - one works, one doesn't ?

Subject: Re: Matching namespaces - one works, one doesn't ?
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Thu, 29 Nov 2007 12:18:34 +0000
Re:  Matching namespaces - one works
On 29/11/2007, Kerry, Richard <richard.kerry@xxxxxxxxxxx> wrote:
> I now have only the one template :
>         <xsl:template
> match="@*[local-name()='noNamespaceSchemaLocation']" />

you could if you wanted re-write that to:

match="@*:noNamespaceSchemaLocation"

which is a bit nicer.

> Seems I may need to read up a bit more on namespaces.  Doesn't seem too
> intuitive to me.....

No it's far from intuitive - the worst thing you can do is rely on
what you expect to happen when it comes to learning namespaces...

Oddly enough every company seems to like to put their XML into a
namespace which represents their company, regardless of whether the
XML will come into contact with any other XML during it's life.  I've
even seen things like:

<comp:someElem>
  <xhtml:p>some text <xhtml:p> some more </xhtml:p></xhtml:p>
</comp:someElem>

...where its thought the "presentational" markup should be separate
from the the business markup.  All nonsense as it just causes problems
down the line and doesn't add anything at all to the XML... and once
its been used like this for a while the cost/time to change it
outweighs just putting up with it.


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

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.