Validate a XML document against a XSD (XML Schema Definition). The content of the XSD file can be obtained
from a dictionary database indicating the database and the code of the object or pass it as argument to the function.
1 dom.validate.xsd
<dom.validate.xsd
dict='dict'
code='code'
encoding='encoding'
>
<xml /> !
<xsd /> ?
</dom.validate.xsd>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Adict | String | Dictionary database (wic) where it is located the DTD file. | |||
Acode | String | Code of the DTD file located un the dictionary database. | |||
Aencoding | string | Indicate the coding of the string of characters to process, as for example ISO-8859-1 or UTF-8. If not specified, it is used the defined in the configuration file for the server. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Exml | Stream | ||||
Exsd | Stream |
Returns | |
---|---|
Type | Description |
ArrayList | <SAXParseException> |
Exceptions
file [...] not found
The name of the file has not been specified.
Example
Validate a XML document against a schema.
Copy
<xsql-script name='dom_validate_xsd_sample1'> <body> <set name='m_errors'> <dom.validate.xsd> <file.open name='movie.xml' temp='false' /> <file.open name='movie.xsd' temp='false' /> </dom.validate.xsd> </set> <iterator name='m_error'> <in> <m_errors /> </in> <do> <println>Validate error at</println> <print><string.ht />line....:</print> <println><exception.getMethod name='getLineNumber'><m_error/></exception.getMethod></println> <print><string.ht />column..:</print> <println><exception.getMethod name='getColumnNumber'><m_error/></exception.getMethod></println> <print><string.ht />message.:</print> <println><exception.getMethod name='getMessage'><m_error/></exception.getMethod></println> <print><string.ht />systemId:</print> <println><exception.getMethod name='getSystemId'><m_error/></exception.getMethod></println> </do> </iterator> </body> </xsql-script>