Hi ,
unfortunately Chiba still doesn't support @includenamespaceprefixes (see
http://chiba.sourceforge.net/features.html for a feature list).
However, I don't think it would help here, since
chibaAdapter.getInstanceDocument() wouldn't be affected. I still wonder
why this method - which IMO shouldn't be there at all - is used to
obtain instance data. As Leigh pointed out a submission should be used.
Uli.
Klotz, Leigh wrote:
Check out
http://www.w3.org/TR/xforms/slice3.html#structure-model-submission and
look at includenamespaceprefixes.
I don't know if Chiba implements it, but it's in the recommendation.
If includenamespaceprefixes is absent, the submission includes all
namespace prefixes that might be used in the instance.
If includenamespaceprefixesspecified, the submission includes all
namespaces "visibly" used and also the list of prefixes in
includenamespaceprefixes.
What gets left out is prefixes that are be used inside values (such as
type="xsd:string") that might or might not require namespace
declarations, but there's no way for the processor to know.
So, you can do <submission includenamespaceprefixes=""> and get it to
drop xforms, xsd, and xsi as long as those prefixes aren't used on
element or attribute names.
B ut if your instance data should suddenly sprout them in a value
somewhere, your downstream application would fail and there's no way for
the form author to know.
If Chiba doesn't support this feature, it should eventually as it
remains a part of the XForms recommendation. But as you see, it's a bit
tricky to use.
Leigh.
------------------------------------------------------------------------
*From:* chiba-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
[mailto:chiba-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx] *On Behalf Of *f c
*Sent:* Monday, May 08, 2006 10:06 AM
*To:* Ulrich Nicolas "Lissé
*Cc:* chiba-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
*Subject:* Re: [Chiba-developer] don't generate namespace in
getInstanceDocument()
We need to send the XML instance data to another system and while the
extra namespace is harmless, the customer doesn't understand why we have
to add them into the XML (since they don't appear on the original
xforms:model). It would be nice if there's a way we can remove them.
*/Ulrich Nicolas Lissé <u.n.l-hi6Y0CQ0nG0@xxxxxxxxxxxxxxxx>/* wrote:
f c,
no, there's no way to prevent this. What are you trying to accomplish ?
Uli.
f c wrote:
> When I call chibaAdapter.getInstanceDocument(), it adds some
namespace
> to the root node. Eg
>
>
> xmlns:xforms="http://www.w3.org/2002/xforms"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="">
> 424 testing
>
>
> Is there a way to not generate those namespaces?
>
> Thanks!
>
>
------------------------------------------------------------------------
> Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries
>
> for just 2¢/min with Yahoo! Messenger with Voice.
--
Ulrich Nicolas Lissé
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
Ulrich Nicolas Lissé
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
|