ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AXIOM-265) adding QName support to attribute values
Date Mon, 07 Nov 2011 22:44:51 GMT

     [ https://issues.apache.org/jira/browse/AXIOM-265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Veithen updated AXIOM-265:
----------------------------------

    Fix Version/s:     (was: 1.3)
                   1.2.15
    
> adding QName support to attribute values
> ----------------------------------------
>
>                 Key: AXIOM-265
>                 URL: https://issues.apache.org/jira/browse/AXIOM-265
>             Project: Axiom
>          Issue Type: New Feature
>            Reporter: Amila Chinthaka Suriarachchi
>            Priority: Minor
>             Fix For: 1.2.15
>
>
> Currently there is no direct API method to give an QName as an attribute value.
> for an example lets say I have to create and OMElment for this xml string (programatically)
> <ns1:inObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://tempuri.org/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="xsd:string">Test String</ns1:inObject>
> I managed to do it in this way by declaring the namespace and set it as a normal attribute.
> OMFactory omFactory = OMAbstractFactory.getOMFactory();
>         OMNamespace omNamespace1 = omFactory.createOMNamespace("http://tempuri.org/","ns1");
>         OMNamespace omNamespace2 = omFactory.createOMNamespace("http://www.w3.org/2001/XMLSchema-instance","xsi");
>         OMNamespace omNamespace3 = omFactory.createOMNamespace("http://www.w3.org/2001/XMLSchema","xsd");
>         OMElement omElement = omFactory.createOMElement("inObject",omNamespace1);
>         omElement.declareNamespace(omNamespace3);
>         OMAttribute omatribute = omFactory.createOMAttribute("type",omNamespace2,"xsd:string");
>         omElement.addAttribute(omatribute);
>         omElement.setText("Test String");
> but nice to have a method 
> createOMAttribute(String,omNamespace,QName)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message