Subject: RE: Confusing namespaces and xslt
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 29 Sep 2008 20:29:44 +0100
|
> The safest, regardless of using XSLT 1 or 2, is to declare in
> your stylesheet your own prefixes for *all* the namespaces
> used in the XML, and then prefix *all* element names in your
> XPath addresses. Even in XSLT 2 I've found myself tripped up
> by declaring the default namespace in my stylesheet because
> of my laziness when dealing with multiple namespaces, so I
> personally don't use the new declaration.
Not a bad discipline, but I think the xpath-default-namespace attribute can
be a great convenience when you're processing a single input document that
uses a single namespace throughout, and makes it the default namespace.
Michael Kay
http://www.saxonica.com/
| Current Thread |
Message not available
- G. Ken Holman - 29 Sep 2008 18:53:09 -0000
- Michael Kay - 29 Sep 2008 19:30:09 -0000 <=
|
|