You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Ulrich, Dominik" <Do...@ids.de> on 2003/11/14 15:38:06 UTC

woody: xmlns declaration is gone after form2xml

Hi everybody
I've got a woody form in which I can select multiple options.
these options are stored in an xml file in an attribute.
so far so good...
this xml doc should be used later as an stylsheet, so there are soms xsl tags inside.
problem: the namespace is declared in the original data file but afterwards is gone in
the result file:

original:
<data>
 <wrapper>
  <content>
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<info>...
		....

output:
<data>
 <wrapper>
  <content>
   <xsl:stylesheet version="1.0">
				<info>...
				...

why is the attribute version stil there and the other gone???
thanks for any help
ciao
dominik

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: woody: xmlns declaration is gone after form2xml

Posted by Bruno Dumon <br...@outerthought.org>.
On Fri, 2003-11-14 at 15:38, Ulrich, Dominik wrote:
> Hi everybody
> I've got a woody form in which I can select multiple options.
> these options are stored in an xml file in an attribute.
> so far so good...
> this xml doc should be used later as an stylsheet, so there are soms xsl tags inside.
> problem: the namespace is declared in the original data file but afterwards is gone in
> the result file:
> 
> original:
> <data>
>  <wrapper>
>   <content>
>    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> 	<info>...
> 		....
> 
> output:
> <data>
>  <wrapper>
>   <content>
>    <xsl:stylesheet version="1.0">
> 				<info>...
> 				...
> 
> why is the attribute version stil there and the other gone???

The first thing to check is how you serialize the DOM-tree, is it done
as in the Woody sample? If so, that part should be OK (I think).

The problem probably comes from JXPath. I'm not sure if JXPath supports
XML namespaces at all. It's already suspicious that you even succeeded
in modifying the document, since I wouldn't know where it would get the
prefix to namespace mappings from. In any case, that's something to
investigate.

BTW, I see that you wrapped the xsl:stylesheet element inside
data/wrapper/context, exactly as in the Woody example. This is not
required for anything, you can have the xsl:stylesheet element as root.

Also, I find your whole setup a bit strange. Modifying an XSL to get
some parameters into it really sounds like a big time hack. Why not
modify another XML document, and provide that XML document as input to
the XSL (possibly merged with the other data you need to transform)? Or
if the parameters are some simple values, provide them to the stylesheet
using map:parameter from the sitemap.

Feel free to ask for more information if you need to (but I probably
won't be able to answer mail for the next week).

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org