|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Can't make template match root element with schema
Hi,
First of all, by default namespace I meant no-namespace. And never mind
about the default behaviour. That was just my way of understanding
namespaces.
Unprefixed element names in XPath 1
_always_ refer to elements in no-namespace nt elements in the default
namespace of the source or stylesheet, this is not a "default behaviour"
that can be overridden, it is fixed.
The mention of XPath 1 too has taken me by surprise.For this discussion I
was using the term XSLT though the topic had more to do more with XPATH.
does that mean both the xml file and stylesheet files are processing
elements in the no-namespace event though the root element has a
"xmlns=http://somenamespace" albeit without a prefix. How do you explain
that the templates in my xsl matched elements that had "html:" prefixes and
still found them. Iam referring to the xhtml2fo transformation in my
earlier mail.
Cheers,
Omprakash.V
David
Carlisle To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
<davidc@xxxxx cc: (bcc: omprakash.v/Polaris)
o.uk> Subject: Re: Can't make template match root element with schema
info
03/16/2005
02:43 PM
Please
respond to
xsl-list
This is sort of like the namespace declaration causes the stylesheet to
override its default behavior which is to treat elements as being in the
default namespace. Alternately, one may specify a prefix in the namespace
declaration with a prefix and use the prefix everywhere in the xml file
and
get the same behavior.
No. Xpath can not tell (normally) whether an element is in the default
namespace or not. the "default namespace" is just like "the namespace
bound to the prefix x" except that teh "prefix" in thi scase is empty.
With the single exception of the name() function, prefixes used in the
source (or non-prefixes in the case of the default namespace) are not
available to XPath (or XSLT). Unprefixed element names in XPath 1
_always_ refer to elements in no-namespace nt elements in the default
namespace of the source or stylesheet, this is not a "default behaviour"
that can be overridden, it is fixed.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. 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
________________________________________________________________________
This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.
If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
Visit Us at http://www.polaris.co.in
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








