Validation of "egov-app" XML by XSD Schema


Introduction

Validation of the gateway-eg files has been done off-line for these examples. The HTML versions were transformed from the XML counter-part. This method solves a potential problem where symbols and characters may be encoded with the HTML Entity mnemonic (acronym-like) codes and will fail to produce valid XML.


Methods

Xerces 2, version 11.0 was used for validation.


Results

Validation Results (no errors)


Discussion

Document Type Definitions (DTD) include many files. For local validation, packages may be downloaded from the W3C.

Validation of the HTML files is done with a Public DTD. There are numerous possibilities from the HTML Family ...

PUBLIC (Local) : -//W3C//DTD XHTML 1.1//EN
SYSTEM (Local) : http://localhost/dtd/xhtml11-flat.dtd

PUBLIC (WWW) : -//W3C//DTD XHTML 1.1 plus MathML 2.0//EN
SYSTEM (WWW) : http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd

The DTD is set by the XSL Transform of the XML File. For example ...

<xsl:output
           encoding="UTF-8"
           omit-xml-declaration="no"
           indent="yes"
           method="xml"
           doctype-public="-//W3C//DTD XHTML 1.1//EN"
           doctype-system="http://localhost/dtd/xhtml11-flat.dtd" />

The XML rendition mimmics Resource Identifier Processing in IETF RFC 2396

Validation of the XML files is done with an XSD Schema, and requires access to three namespaces.

Schema have no Formal Public Identifier (FPI). Access to files can be over a network (or the web) or on the local file system

For validation, the schema location is specified in the root element. The main schema reads any others. For example ...

<d:egov-app 
      xmlns:d="http://www.ietf.org/rfc/rfc2396.txt#"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.ietf.org/rfc/rfc2396.txt# http://www.rustprivacy.org/2013/egov/gateway/validation/rfc2396.xsd">

Among other things, this schema verifies that RDFa Lite Linked Data Attributes are used properly and also that the plain text descriptions contain no hyperlink references. This is a fail-safe procedure ... there are no further, possibly inaccessible, data points required by the Application described. This procedure also aids in porting the Application from one region to another.


Code Fast, Break Things.

HOWTO just break things, The Agile Programing Guide to Leisure.