You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Jacob Danner (JIRA)" <xm...@xml.apache.org> on 2005/02/08 00:28:12 UTC

[jira] Assigned: (XMLBEANS-93) Default behavior of Factory.parse (or set )

     [ http://issues.apache.org/jira/browse/XMLBEANS-93?page=history ]

Jacob Danner reassigned XMLBEANS-93:
------------------------------------

    Assign To: Jacob Danner

Can you verify this is still an issue in v2?

> Default behavior of  Factory.parse (or set )
> --------------------------------------------
>
>          Key: XMLBEANS-93
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-93
>      Project: XMLBeans
>         Type: Improvement
>   Components: XmlObject
>     Versions: Version 1.0.3
>     Reporter: jean-christophe.pazzaglia
>     Assignee: Jacob Danner
>     Priority: Minor

>
> Dear XmlBeaner,
> I find the following behavior rather 'unnatural':
> if you do have a DOM element (likely to come from another library
> which doesnot use xmlbean) and you want to 'plug'-it with your 
> XML-Bean structure it does not work 'out of the box' (even if the types
> are compatible !?!) and moreover produce non valid XML !
> It looks trivial:
> let's imagine that you want to add a signature (using xml-security):
> myXMLBean.setSignature( SignatureType.Factory.parse(sig.getElement())); // compile
> this will generate :
> <myXMLBean>
> <xd:Signature xmlns:xd="http://www.w3.org/2000/09/xmldsig#">
>  <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
> ...
> </myXMLBean>
> while you expect :
> <myXMLBean>
> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
> ...
> </myXMLBean>
> in order to make it you should use
> XmlOptions opts = new XmlOptions();
> opts.setLoadReplaceDocumentElement(null);
> myXMLBean.setSignature( SignatureType.Factory.parse(sig.getElement(),xmlopts)); 
> looks rather odd to me ...
> jc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org