OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Got a program that generates a list of assertions aboutan XSD?

On Fri, Nov 13, 2015 at 9:48 PM, Costello, Roger L. <costello@mitre.org> wrote:
> Hi Folks,
> Have you written a program to generate a list of assertions about an XSD?

Yes, very recently - using XSLT 2.0 to generate XSD 1.1 with embedded
assertions from an XSD 1.0 'base' schema.

The schema is for a configuration file where each leaf-element either
has a 'literalValue' attribute or a 'parameterRef' attribute.
Assertions are generated for 'parameterRef' to ensure that the type of
the referenced parameter (defined elsewhere in the XML instance) is
consistent with that defined in the XSD for the 'literalValue'.
(Normal XSD unique key reference constraints are still used to ensure
referential integrity).

Auto-generating the assertions saved a lot of manual effort and of
course means that the assertions are re-generated properly each time
the schema design is updated. A side-benefit is that saxon:message and
xerces:message extension attributes can also be auto-generated with
descriptions of the location of the assertion error and the expected
type. (These message attributes are shown by the oXygen XML editor
when an assertion test fails during editing).


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS