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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Universal Schema to Validate an Arbitrary Well-FormedDocum

[ Lists Home | Date Index | Thread Index ]

Peter Rodgers <pjr@1060.org> writes:

> Any assistance to the following problem gratefully received.
> Problem:
> I require an XML Schema (XSD) which will validate an arbitrary
> well-formed document as valid. You might call this the universal schema.

The empty schema has this property, in so far as it's not _really_
empty, it contains the built-in type definitions, including
xs:anyType, which is what you want.  Now all you need is a schema
validator which exposes an entry-point corresponding to clause 1 of
section 5.2 Assessing Schema Validity of part 1 of the W3C XML Schema
REC [1], and use that entry point specifying xs:anyType as the type
definition to use.  XSV [2] exposes such an entry point, so for

  > xsv -T {http://www.w3.org/2001/XMLSchema}anyType [anywellformedxmldoc]

will report the document element as [validity]=valid

I don't know enough about WSDL 1.1 service definitions to know whether
they allow you to name the type defn to use . . .


[1] http://www.w3.org/TR/xmlschema-1/#validation_outcome
[2] http://www.ltg.ed.ac.uk/~ht/xsv-status.html
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]


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

Copyright 2001 XML.org. This site is hosted by OASIS