[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] deep "copy-of" a source fragment
Subject: Re: [xsl] deep "copy-of" a source fragment From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 5 Sep 2002 10:35:14 +0100 |
> he HTML Tidy program outputs an [unqualified?] xmlns attribute > (declaration) in the <html> root element so the namespace is "html". No that means the namespace for unprefixed elements is http://www.w3.org/1999/xhtml > what is the deal with "where" you declare the namespace? Does it matter? when you use x:html in any Xpath the x: refers to the namespace binding in scope at that point. You can put xmlns:x="..." on _any_ ancestor element of that point of teh stylesheet, but it has to be somewhere otherwise x: will not be declared. > Must I do all my declarations in the root element? usually prefixes are constant over the whole stylesheet so if you put them all at the top you only need to do it once. > ** My only concern is that if for whatever reason the namespace > declaration changes, it will [silently] "break" my XSL templates. A namespace is part of the name. the above is tru but it is _exactly_ the same as saying that a template match="html" will break if you change the name of the element in the source to <html2>. > So > maybe I will take the easy way out and suppress namespace declarations > in my xhtml source reducing it to an anonymous well-formed document > which is xhtml by convention (rather than validity). > but it won't be xhtml (by convention or otherwise). The whole point of namespaces is that systems know what kind of element they have. if you make the elements anonymous then they are well, anonymous. If you sent elements in teh xhtml namespace tp mozilla or netscape 6/7 then they will render using html semantics. if you send (as text/xml) a document in no namespace which just happens to have elements called <html <head etc, then it will be treeted as unstyled, unkown, xml and not rendered at all. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] deep "copy-of" a source f, Terence Kearns | Thread | RE: [xsl] deep "copy-of" a source f, Dion Houston |
RE: [xsl] A few questions to the ex, "Braumüller, Hans" | Date | [xsl] A few questions to the expert, juggy |
Month |