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]
Other format: [Raw text]

RE: questions regd namespaces


Thanks Michael

Quoting Michael Kay <michael.h.kay@ntlworld.com>:

> > I have an xml with a namespace declaration
> > eg.
> > 
> > <all-centres xmlns="http://www.nda-centres.com/namespaces";>
> > 
> > and i want to out put the xmlns attribute..
> 
> Namespace declarations are output automatically by the serializer if the
> result tree contains a namespace node. The result tree will
> automatically contain a namespace node if you output an element with
> local name "all-centres" and namesapce URI
> "http://www.nda-centres.com/namespaces";, though it won't necessarily use
> the prefix that you expect. For example, if you write
> 
> <xsl:element name="all-centres"
> namespace="http://www.nda-centres.com/namespaces";>
> 
> then a suitable namespace declaration will be output.
> 
> > It obviously is not working when i deal with it in the normal 
> > attribute way.. my questions: 
> 
> 1. Is xmlns treated different from a normal attribute?? 
> 
> Yes, completely differently.
> 
> 2. In my case how do i output the value of xmlns?? 
> 
> Normally, just be adding an element or attribute to the result tree
> whose name is in the relevant namespace.
> 
> 3. How will someone benifit from using a namespace declaration?? 
> 
> A big question, I'll leave someone else to answer it...
> 
> 4. In the xsl:stylesheet instruction, 
> > <xsl:stylesheet version="1.0" 
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> > the above namespace allows some XSL functions where as the 
> > older version 
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";> does 
> > not allow some methods..
> > so where are these methods?? how does the processor know that 
> > the perticular 
> > namespace doesnt contain the method or does contain the 
> > method?? where does it 
> > look for this information?
> > 
> The old namespace is recognized only by older versions of Microsoft's
> processor. It's essentially two different processors for two different
> languages bundled into one product, and it uses the namespace to decide
> whether to invoke the new XSLT processor or the old WD-xsl processor.
> 
> Michael Kay
> Software AG
> home: Michael.H.Kay@ntlworld.com
> work: Michael.Kay@softwareag.com 
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 


--------------------------------------------------------------
Sent with "Me-Mail", Boltblue's FREE mobile messaging service.
http://www.boltblue.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]