Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: define static content in XML-Schema / Relax NG

From: mhuhn.de@-----.---
To: NULL
Date: 8/2/2005 3:31:00 AM
It is (normally) not the whole document that is predetermined but I
want the possibility to predetermine large parts of a document.
Furthermore, I want to use the same mechanism (i.e. W3C XML Schema) to
validate. In addition to validation I want to use this schema (or
better call it template) to generate a valid XML file without further
information.
I use a modified version of W3C Schema now, i have an element called
"template" where I can predetermine fixed parts and also include
dynamic elements again. Looks like that:
...
<xs:complexType name="colorsType">
  <xc:template>
    <color>red</color>
    <color>blue</color>
    <color xs:type="colorType" xs:minOccurs="0" xs:maxOccurs="4" />
  </xc:template>
</xs:complexType>
...

This is ok for my purpose and it works as an "XML constructor" as I
provide initial values for regular pattern values for example. But I
have to write my own validator which is quite a lot of work. You
schematron suggestion is nice for validation but doesn't work for
creation. I need it all in one file.



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent