xsl-list
[Top] [All Lists]

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

2007-11-29 05:19:09
On 29/11/2007, Kerry, Richard <richard(_dot_)kerry(_at_)siemens(_dot_)com> 
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--