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

Re: I need to make sure that all namespace declaration

Subject: Re: I need to make sure that all namespace declarations get output to a particular element, not the document element
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 23 Mar 2007 12:28:26 +0100
Re:  I need to make sure that all namespace declaration
bryan rasmussen wrote:
Actually I got another email where Lars Opermann, the fellow doing the
code inspection, says that he doesn't think that is what it's doing
after all, but if it were this would explain 90% of the problem I'm
having, although I would still be in the dark as to why when I have
<in:Invoice> with the in prefix declared further up in the document

With 'further up', do you mean _after_ it is actually used? And do you mean this as a result of the XSLT process? I thought you meant that you needed a more precise control over where you put your xml namespace declarations, but perhaps something else's up? Do you mean that your document looks like this XML doc, with incorrect namespace decl?


<root>
  <in:Invoice>
      <in:somenode xmlns:in="urn:invoice"/>
  </in:Invoice>
</root>


or like this (correct in terms of xml+ns)


<root>
  <in:Invoice xmlns:in="urn:invoice">
      <in:somenode />
  </in:Invoice>
</root>

I thought, from your OP, that the doc looked more something like this:

<root>
 <somenode xmlns:in="urn:invoice">
    <in:Invoice>
        <in:somenode />
    </in:Invoice>
 </somenode>
</root>

and that you rather want the namespace declaration on the in:Invoice element (middle example), and not before that.

I am just trying to clarify what it is that you actually need. In your OP there were a zillion namespaces and I hope that with a simple example it becomes more clear.

and I submit the xform via  a put to the filesystem what comes out is
<:Invoice> instead of just a message box with message "The in prefix
has not been declared."

The element that is serialized as '<:Invoice>' is not a legal XML+NS element (I believe it would be legal in old original XML, without namespaces, but that's not what XSLT creates).When you say 'put to the filesystem', do you mean the XSLT serializer, or your own post-processor? If any XSLT serializer creates a tag like that, it's an error.


-- Abel

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.