This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Re: implements-prefix vs implements-namespace


Hi Dave,

>> Do you even have to copy them? I don't know any processor that
>> randomly changes the prefixes of namespaces defined in the XSLT
>> stylesheet,
>
> I do. M$. create a stylesheet to create a stylsheet. If you use
> namespace-alias stylesheet-prefix="out" then M$ change the result to
> xsl. Saxon Xalan don't. They keep out as the prefix. (example, p
> 236, 'the book')

That's somewhat different, because xsl:namespace-alias does some
fairly non-standard stuff to namespace declarations anyway.
[Personally, I prefer the MSXML way because I like my generated
stylesheets to use the same prefix for XSLT instructions as I used for
XSLT instructions in the original stylesheet, purely for readability.]

What I was talking about was that I don't know of any processor that
will change:

  <my:foo your:bar="his:baz"
          xmlns:my="http://www.my.com"
          xmlns:your="http://www.your.com"
          xmlns:his="http://www.his.com" />

to:

  <ns0:foo ns1:bar="his:baz"
           xmlns:ns0="http://www.my.com"
           xmlns:ns1="http://www.your.com"
           xmlns:ns2="http://www.his.com" />

If there are such processors, then you would have to copy namespace
declarations explicitly. If there aren't, then you don't - just
declare the namespace and it will be copied, prefix retained,
automatically.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]