[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: problem w/ namespaces

Subject: Re: problem w/ namespaces
From: "David N Bertoni/Cambridge/IBM" <david_n_bertoni@xxxxxxxxxx>
Date: Tue, 30 Apr 2002 08:54:16 -0700
Re:  problem w/ namespaces
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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.