XMLDSSDOMFromXSD
Keywords: uk.ac.bbk.dcs.automed.xml.wrappers.XMLDSSDOMFromXSD class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.bbk.dcs.automed.xml.wrappers
Class XMLDSSDOMFromXSD

    java.lang.Object
      uk.ac.bbk.dcs.automed.xml.wrappers.XMLDSSDOMFromXSD

    public class XMLDSSDOMFromXSD

extends java.lang.Object

Parses an XML Schema and creates the corresponding XMLDSS in DOM format.

IMPORTANT: an XML Schema that passes through this algorithm with no exceptions/errors is not to be considered valid!

Features not yet supported:

- Substitution groups
- Type substitution
- Redefine elements
- Namespaces: although the class is namespace-aware, it is not yet guaranteed that it will handle namespaces well

Model groups: all model group declarations are treated as 'all' model group declarations, as this is the way the XMLDSS of a given XML file would be created. This means that the special behaviour of choice group and this of nesting model groups is ignored.

Wildcards: if the XML Schema contains any element or attribute wildcards, it will obviously ignore them, as it will not know what content to create.

Ignored declarations: the following declarations are ignored, as they obviously do not contribute to the XMLDSS content.

- ID/IDREF/IDREFS
- key/keyref
- annotation
- import

Should any unexpected behaviour of the algorithm occur (error/exception/unexpected XMLDSS) please contact the author of the class, specifying the problem and supplying the XML Schema used.

Author:
  Lucas Zamboulis

Constructor Summary
`XMLDSSDOMFromXSD(java.lang.String URI, java.lang.String schemaName)`

Method Summary
`org.w3c.dom.Document` | `getSchemaDoc()`
`org.w3c.dom.Document` | `getSchemaUIDDoc()`
`org.w3c.dom.Document` | `getXSD()`
`org.w3c.dom.Document` | `translate(org.w3c.dom.Document xsd)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XMLDSSDOMFromXSD

    public XMLDSSDOMFromXSD(java.lang.String URI,
                            java.lang.String schemaName)
                     throws XMLException

Parameters:
  `URI` - the URI where the XML Schema is located; must be prefixed http:// if it is a URL, or file:/// if it is local.
Throws:
  `XMLException`

Method Detail

### translate

    public org.w3c.dom.Document translate(org.w3c.dom.Document xsd)
                                   throws XMLException

  Parameters:
    `xsd` - the XML Schema to be translated into XMLDSS
  Returns:
    the XMLDSS corresponding to the input XML Schema, in DOM format
  Throws:
    `XMLException`

### getXSD

    public org.w3c.dom.Document getXSD()

  Returns:
    the input XML Schema in DOM format

### getSchemaUIDDoc

    public org.w3c.dom.Document getSchemaUIDDoc()

  Returns:
    the DOM XMLDSS schema WITH UIDs

### getSchemaDoc

    public org.w3c.dom.Document getSchemaDoc()

  Returns:
    the XMLDSS schema WITHOUT UIDs.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD