- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Fri, 10 Jan 2003 15:57:05 +0000
- To: "Santino Troiani" <santino.troiani@next.it>
- CC: xmlschema-dev@w3.org
Hi Santino, > 1. The layout of the variable part depends on some other information > pertinent to XML elements of the document. How can I specify this > constrain ? > > <Message id="19"> > ... > <Information> > <Text>...</Text> > <Data ...>...</Data> > </Information> > ... > </Message> > > Based on the value of the attribute "id" the layout of the element > Data can vary. You can't express this co-occurrence constraint using XML Schema. You could use Schematron in conjunction with XML Schema to do it, or you could switch to RELAX NG, which can express these kinds of constraints. > 2. Once I have the document I can validate some its elements against > a XSD Schema. Can I *generate* an XML document or fragment from a > XSD schema, with some external decisions provided by the application > ? If yes how must the schema be structured ? There are applications around that can do this. A Google search for "generate instance schema" points to Sun's XML Instance Generator: http://wwws.sun.com/software/xml/developers/instancegenerator/ for example. I have an inkling that XML Spy supports something similar. Any constraints on the structure of the schema are likely to be implementation specific. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Friday, 10 January 2003 10:57:28 UTC