This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: problem w/ namespaces
- From: "David N Bertoni/Cambridge/IBM" <david_n_bertoni at us dot ibm dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 30 Apr 2002 08:54:16 -0700
- Subject: Re: [xsl] problem w/ namespaces
- Reply-to: xsl-list at lists dot mulberrytech dot com
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@Deio.net |
| | Sent by: |
| | owner-xsl-list@lists.mulbe|
| | rrytech.com |
| | |
| | |
| | 04/30/2002 07:48 AM |
| | Please respond to xsl-list|
| | |
|---------+------------------------------------->
>---------------------------------------------------------------------------------------------------------------------------|
| |
| To: XSL-List@lists.mulberrytech.com |
| 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