Changes

Jump to navigation Jump to search
531 bytes added ,  15:54, 24 August 2015
no edit summary
==validate:dtd==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|validate:dtd|$input as item()|empty-sequence()}}<br />{{Func|validate:dtd|$input as item(), $dtd schema as xs:string|empty-sequence()}}
|-
| '''Summary'''
try {
let $doc := <invalid/>
let $dtd schema := '<!ELEMENT root (#PCDATA)>' return validate:dtd($doc, $dtdschema)
} catch bxerr:BXVA0001 {
'DTD Validation failed.'
|-
| width='120' | '''Signatures'''
|{{Func|validate:dtd-info|$input as item()|xs:string*}}<br />{{Func|validate:dtd-info|$input as item(), $dtd schema as xs:string|xs:string*}}|-| '''Summary'''|Validates a document and returns warnings, errors and fatal errors in a string sequence. See [[#validate:dtd|validate:dtd]] for more details on the function arguments.|-| '''Errors'''|{{Error|BXVA0002|#Errors}} the validation process cannot be started.|} ==validate:dtd-report== {| width='100%'|-| width='120' | '''Signatures'''|{{Func|validate:dtd-report|$input as item()|element(report)}}<br />{{Func|validate:dtd-report|$input as item(), $schema as xs:string|element(report)}}
|-
| '''Summary'''
|Validates the a document specified by {{Code|$input}} and returns warningwarnings, errors and fatal errors in a string sequenceas XML. {{Code|$input}} can be specified asSee [[#validate:* {{Codedtd|xsvalidate:string}}, containing the path to dtd]] for more details on the resource,* {{Code|xs:string}}, containing the resource in its string representation, or* {{Code|node()}}, containing the resource itself.{{Code|$schema}} can be used to specify the DTD for validation. If no DTD is given, {{Code|$input}} is required to contain a DTD doctype declarationfunction arguments.<br />
|-
| '''Errors'''
|-
| '''Summary'''
|Validates the a document specified by {{Code|$input}} and returns warningwarnings, errors and fatal errors in a string sequence. See [[#validate:xsd|validate:xsd]] for more details on the function arguments.|-| '''Errors'''|{{CodeError|$inputBXVA0002|#Errors}} and {{Codethe validation process cannot be started.|$schema}} can be specified as ==validate:xsd-report== * {{Code|xs:string}}, containing the path to the resource,width='100%'|-| width='120' | '''Signatures'''* |{{CodeFunc|xsvalidate:string}}, containing the resource in its string representation, or* {{Codexsd-report|$input as item()|nodeelement(report)}}, containing the resource itself.<br />{{CodeFunc|validate:xsd-report|$schema}} can be used to specify the schema for validation. If no schema is giveninput as item(), {{Code|$input}} is required to contain an {{Codeschema as xs:string|xsi:element(noNamespacereport)schemaLocation}} attribute |-| '''Summary'''|Validates a document and returns warnings, errors and fatal errors as defined in XML. See [[http#validate://www.w3.org/TR/xmlschema-1/#xsi_schemaLocation W3C XML Schemaxsd|validate:xsd]]for more details on the function arguments.<br />
|-
| '''Errors'''
|-
| '''Summary'''
|Validates the a document specified by {{Code|$input}} and returns warnings, errors and fatal errors in a string sequence. The validation schema is specified by {{Code|$schema}}, and {{Code|$compact}} indicates if the schema uses the compact RelaxNG notation. {{Code|$input}} and {{Code|$schema}} can be specified as:* {{Code|xsSee [[#validate:string}}, containing the path to the resource,* {{Coderng|xsvalidate:string}}, containing the resource in its string representation, or* {{Code|node()}}, containing rng]] for more details on the resource itselffunction arguments.
|-
| '''Errors'''
|{{Error|BXVA0002|#Errors}} the validation process cannot be started.<br/>{{Error|BXVA0003|#Errors}} the RelaxNG validator is not available.
|}
 
==validate:rng-report==
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|validate:rng-report|$input as item(), $schema as xs:string|element(report)}}<br />{{Func|validate:rng-report|$input as item(), $schema as xs:string, $compact as xs:boolean|element(report)}}
|-
| '''Summary'''
|Validates a document and returns warnings, errors and fatal errors as XML. See [[#validate:rng|validate:rng]] for more details on the function arguments.
|-
| '''Errors'''
|{{Error|BXVA0002|#Errors}} the validation process cannot be started.
|}
;Version 8.3
* Added: [[#validate:rng|validate:rng]], [[#validate:rng-info|validate:rng-info]]
* Added: [[#validate:dtd-report|dtd-report]], [[#validate:xsd-report|xsd-report]], [[#validate:rng-report|validate:rng-report]]
;Version 7.6
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu