|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: adding namespaces to result nodes
> Iam taking the text of an element in the input file > and making it > into an element. The element in question is named 'slideshow' and it > doesn't have a prefix. You say > "the processor may put the element in the default namespace, or it may > invent a prefix" > Does this mean the processor Iam using (xalan) is adding the > prefix whereas > another processor may not. Yes. If you write <xsl:element name="slideshow" namespace="http://some.uri/"/> Then the processor may generate <ns0:slideshow xmlns:ns0="http://some.uri/"/> or <slideshow xmlns="http://some.uri/"/> - it's implementation-defined. XSLT 2.0 has rules that make the generation of namespace prefixes slightly more predictable, though there are still cases where the processor is allowed to dream one up. > > Iam not tied to any processor and I may opt for another > processor if this > is the case other things permitting. It's not a good idea to choose a processor because it happens to do what you want, when the language says that the behavior of your stylesheet is unpredictable. Better to ask yourself some questions about the requirement you are trying to satisfy - why do namespace prefixes matter so much? Michael Kay http://www.saxonica.com/
|
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








