[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Got a program that generates a list of assertions aboutan
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). Phil
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|