Did you know ... Search Documentation:
Pack wsdl -- prolog/xml_schema.pl
PublicShow source

Provide a simple mapping between Prolog structures and an XML DOM structure that satisfies a given XSD type. Input is

  • The desired element name
  • List of (sub)element name=value. E.g. xml_dom(authenticate, [authId=jan, password=geheim], DOM).
  • Element values can be a list for multiple
  • Element names can be name1/name2/... to disambiguate paths.

How it works:

  • Find the element, create element(Element, Atts, Content)
  • Find the type declaration
  • Fill in Atts and Content
To be done
- This library is very incomplete. It currently only supports a few XML primitive types (string, integer and boolean). There is no clear view how to deal with abiguities and documents that demand complicated nesting. It mainly supports simple SOAP messages that typically require simple attribute-value pairs.
 xsd_create_element(+ElementName, :Values, -DOM) is det
Create a valid XML DOM, given the name of the outer elements and a list of Name=Value pairs.
 xsd_type_description(:XMLDescription, -PrologDescription)
Transform an XSD type description into a readable Prolog one.
To be done
- Very incomplete.
 xsd_read(:File, +Options) is det
Read definitions from File. Asserts the following facts:
xsd_element(Name, Type, Options)
xsd_type(Type, Description)
Description is simply the XSD DOM
 xsd_load(:Schema, +Options)
Build XSD types from a parsed XML xsd:schema DOM structure.
 xsd_element_documentation(:Element, ?Type, ?Doc)
Element is the local name (i.e., without namespace)

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.