xsl-list
[Top] [All Lists]

Re: [xsl] I need to make sure that all namespace declarations get output to a particular element, not the document element

2007-03-23 04:40:39


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>

yes, like that, I wanted it like this

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


which I now have by basically running the toplevel layout as a named
template and copying the xml structure I need into the xforms:model


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



> 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.


no, it is not the xslt that output that. it was the xforms submission.

obviously the xforms engine was incorrect to serialize that structure
but that is something different.

Cheers,
Bryan Rasmussen

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>