You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marcin Okraszewski <ok...@o2.pl> on 2003/10/31 01:20:46 UTC

ESQL: get-xml: problem with namespace for root element.

Hi,
I want to obtain an xml mixed content using <esql:get-xml>. I add n
root element but I would like to set a namespace for it.
Unfortunately it doesn't work by adding only prefix. I can't leave
root in namespace with empty prefix, because the xml in DB is
without prefix too, which causes namespace mismatch.

------------

Here is an examlple:

a column "test" in DB: "some <tag>example</tag> of get-xml"

1. If I put a XSP like this:
<esql:get-xml column="test" root="root"/>

I obtain an namespace missmatch:
<root>some <tag>example</tag> of get-xml</root>

2. Put root outside "get-xml"
<ns:root><esql:get-xml column="test"/></ns:root>

I obtain an empty root, because the source has mixed content:
<ns:root></ns:root>

3. Put prefixed root name:
<esql:get-xml column="test" root="ns:root"/>

Results in completely empty output, without even an error.

----------

How can I solve it?

Regards,
Marcin Okraszewski

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


Re: ESQL: get-xml: problem with namespace for root element.

Posted by Marcin Okraszewski <ok...@o2.pl>.
>> Hi,
>> I want to obtain an xml mixed content using <esql:get-xml>. I add n
>> root element but I would like to set a namespace for it.
>> Unfortunately it doesn't work by adding only prefix. I can't leave
>> root in namespace with empty prefix, because the xml in DB is
>> without prefix too, which causes namespace mismatch.
> 
> 
> This is currently not supported :-|
> Patches are welcome!

I have commited the patch to bugzilla.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24305

-- 
-------------------------------------------------------------
                       Marcin Okraszewski
okrasz@o2.pl                                       GG: 341942
okrasz@vlo.ids.gda.pl          PGP: www.okrasz.prv.pl/pgp.asc
-------------------------------------------------------------




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


Re: ESQL: get-xml: problem with namespace for root element.

Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Marcin Okraszewski wrote:
> Hi,
> I want to obtain an xml mixed content using <esql:get-xml>. I add n
> root element but I would like to set a namespace for it.
> Unfortunately it doesn't work by adding only prefix. I can't leave
> root in namespace with empty prefix, because the xml in DB is
> without prefix too, which causes namespace mismatch.

This is currently not supported :-|
Patches are welcome!

It is quite simple to do it for your case -- doing it for the general 
case needs a little more work but shouldn't be that hard.

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


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