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

Re: Selecting a descendant child at arbitrary depth

Subject: Re: Selecting a descendant child at arbitrary depth
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 14 Mar 2001 11:35:50 GMT
xpath arbitrary depth
>  does not specify any namespaces or even DTDs to validate against:
You don't validate against namespaces, they are just sets of names.

>  So if this is true, how did it know that <html xmlns="...">
> was changing the namespace? 

Because xmlns="..." is a namesapace declaration.
XSLT (only) supports files that conform to the Namespaces in XML
Recommendation. That's also how it knows that the XSL file is indeed
XSL, by recognising
xmlns:whatever="http://www.w3.org/1999/XSL/Transform"


> Is the "xmlns" attribute a "protected keyword" attribute?  I

yes, or rather, according to the Xpath data model it's not an attribute
at all, it's a namespace declaration.

> Is there any other attribute names that I can't use?
The XML specification restricts all names beginning with xml (any case).

> "How do I get the stylesheet to work with
Declare the XHTML namespace in your stylesheet
xmlns:h="http://www.w3.org/TR/xhtml1"

(say on the xsl:stylesheet element)

then match against h:html not html in your Xpath expressions.

Note that your source document whilst conforming to the Namespace Rec
misuses namespaces as it claims that docBody is an element in the XHTML
namespace.

It would be better if you had

<html xmlns="http://www.w3.org/TR/xhtml1">
**XHTML tags**
<my:docBody xmlns:my="mailto:pmcevoy@xxxxxxxx";>

so that it was clear who was defining which elements.

> Is there a way to get the stylesheet to ignore these xmlns declarations?
no.
You can have match="html|h:html" if you want to match against either
form.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.