Subject: Re: [xsl] problem w/ namespaces From: "David N Bertoni/Cambridge/IBM" <david_n_bertoni@xxxxxxxxxx> Date: Tue, 30 Apr 2002 08:54:16 -0700 |
If you can post a _minimal_ set of inputs that reproduces this problem, someone can probably help you. With just the information you've provided here, it's impossible to determine whether the error is your's or your processor's. If you're generating other literal result elements in your templates, make sure they all have a default namespace declaration. Otherwise, they will _not_ be in that namespace, and your processor is correct in turning of the default namespace. Namespaces are not "inherited" in the result tree -- elements and attributes which are in namespaces in their source(s) get those same namespaces in the result tree. If you want _all_ literal elements in your stylesheet to use the same default namespace, declare it on the stylesheet element. Dave |---------+-------------------------------------> | | Jakub.Valenta@xxxxxxxx | | | Sent by: | | | owner-xsl-list@xxxxxxxxxxx| | | rrytech.com | | | | | | | | | 04/30/2002 07:48 AM | | | Please respond to xsl-list| | | | |---------+-------------------------------------> >---------------------------------------------------------------------------------------------------------------------------| | | | To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx | | cc: (bcc: David N Bertoni/Cambridge/IBM) | | Subject: [xsl] problem w/ namespaces | >---------------------------------------------------------------------------------------------------------------------------| Hi all, I am trying to define namespace of my xml data and I do it like <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl ="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <CbaMessage xmlns="http://www.deio.net/cbamessage" ... In the output of the transformation the root elemnt (CbaMessage) has correct namespace, but all direct children elements of <CbaMessage> look like this <Transport xmlns=""> I want the namespace to be valid for all elements not just for the root. How can I do it? Any help appreciated. br, Jakub XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] problem w/ namespaces, Oleg Tkachenko | Thread | [xsl] How do you get Attributes in, Bolen, Lori Contrac |
Re: [xsl] problem w/ namespaces, Jeni Tennison | Date | Re: [xsl] How do you get Attribute, Jeni Tennison |
Month |