Validate a XML document against a DTD. The content of the DTD file can be obtained from a dictionary
database indicating the database and the code of the object or pass it as an argument to the function.
1 dom.validate.dtd
<dom.validate.dtd
dict='dict'
code='code'
encoding='encoding'
>
<xml /> !
<xsd /> ?
</dom.validate.dtd>
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 in the dictionary database. | |||
Aencoding | string | Indicates the codification in 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 DTD.
Copy
<xsql-script name='dom_validate_dtd_sample1'> <body> <set name='m_errors'> <dom.validate.dtd> <file.open name='movie.xml' temp='false' /> <file.open name='movie.dtd' temp='false' /> </dom.validate.dtd> </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>