Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: Steve Jorgensen <nospam@------.------>
To: NULL
Date: 7/30/2005 9:35:00 PM
I don't get it.  If the exact content is predetermined, what information does
the document convey?

If a large section of a document must be boilerplate for content from a
specific source, why not make a schema and documents such that the boilerplate
content is excluded, then use XSLT to insert the boilerplate content after the
initial validation is done?

Finally, if inserting the content fixed later is not an option, you could use
a combination of XML Schema and Schematron since Schematron makes it easy to
validate data content.  In the case below, you just first assert that, in the
context of "/colors", "color[1]='green' and color[2]='red'"

On 22 Jul 2005 09:24:41 -0700, mhuhn.de@g... wrote:

>I am using XML Schema for quite a while but haven't written a single
>line of Relax NG yet.
>
>For what I know, I cannot define static content within an XML Schema.
>For example, I have the following structure:
>
><colors>
> <color>green</color>
> <color>red</color>
></colors>
>
>With XML-Schema, I can say colors should have to elements of type
>color, and color can contain "green" or "red". But I cannot say that
>the content has to be exactly as posted above. Is this correct?
>
>Is there a way to do this in Relax NG?
>
>I need it for more levels than just one. I want to be able to define a
>whole XML-Document within the "Schema", so only a document with exactly
>that content will be valid.



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