[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Commented: (XMLBEANS-93) Default behavior of  Factory.parse (or set )
From:       "Yana Kadiyska (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2005-06-13 23:13:46
Message-ID: 1568608855.1118704426355.JavaMail.jira () ajax ! apache ! org
[Download RAW message or body]

    [ http://issues.apache.org/jira/browse/XMLBEANS-93?page=comments#action_12313527 \
] 

Yana Kadiyska commented on XMLBEANS-93:
---------------------------------------

I am not sure I understand the problem correctly. Attached is a "dumbed" down test \
and a simple schema...The code behaves correctly as of SVN 190504...could you fix the \
sample/ provide your own so we can repro the bug? ( I am running against branch 1.x \
in SVN at the revision above)

> 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: Yana Kadiyska
> Priority: Minor
> Fix For: TBD
> Attachments: Jira93.java, jira-93.xsd
> 
> 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
-
For more information on JIRA, 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic