You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by "John Kaputin (JIRA)" <ji...@apache.org> on 2007/01/26 23:46:49 UTC

[jira] Commented: (WODEN-126) Underlying element should be accessible from API

    [ https://issues.apache.org/jira/browse/WODEN-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467946 ] 

John Kaputin commented on WODEN-126:
------------------------------------

r500291 
Added these two methods to the org.apache.woden.Schema interface:
XMLElement getXMLElement()
void setXMLElement(XMLElement)

This code example will retrieve the org.w3c.com.Element object for the  underlying <xs:schema> or <xs:import> element within the <wsdl:types> element:

        //'types' is the TypesElement returned by DescriptionElement.getTypesElement()
        XMLElement xmlEl = types.getSchemas()[0].getXMLElement();
        //'domEl' is a <xs:schema> or <xs:import> DOM Element
       Element domEl = (Element)xmlEl.getSource();

If using the OM implementation, simply cast the result of getSource() to OMElement.

> Underlying <xs:schema> element should be accessible from API
> ------------------------------------------------------------
>
>                 Key: WODEN-126
>                 URL: https://issues.apache.org/jira/browse/WODEN-126
>             Project: Woden
>          Issue Type: Improvement
>            Reporter: John Kaputin
>             Fix For: M7
>
>
> Woden supports XML Schema datatypes via ws-commons XmlSchema, but Woden users may prefer to use other mechanisms for manipulating schema information. The API should allow the user to access the underlying <xs:schema> element 'wrapped' by the ImportedSchema or InlinedSchema object so they have the flexibility to choose other mechanisms.  For example, in the DOM implementation the underlying schema element is an org.w3c.dom.Element object. To avoid API-dependencies on particular XML parsers or object models the org.apache.woden.XMLElement class should be used for this purpose, as this is an abstraction of DOM Element, OM Element, etc.
> The org.apache.woden.schema.Schema interface (supertype of ImportedSchema and InlinedSchema) requires two new methods:
> void setSchemaElement(XMLElement)
> XMLElement getSchemaElement()

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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