Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] dynamically generated XML Schema?! Re: [xml-dev] R: [xml-dev] Number of active public XML schemas

From: "Jeff Greif" <jgreif@------.---------.--->
To: "Burak Emir" <Burak.Emir@----.-->,"Michael Kay" <michael.h.kay@--------.--->
Date: 11/3/2004 3:35:00 PM
>> Why generate schemas dynamically?  What's the advantage of an XML
>> Schema language for this?

Consider an application that consumes schemas, say, to generate forms for
user input.  (Based on a type in a schema, it generates a form.).  Sometimes
the type can be specialized to make things easier for the human entering the
data, or for validation of the result.

For example, in a large institution like the headquarters of Microsoft, you
might have forms on the Intranet to produce documents like this for
centralized services:

<printRequest  id=:"234567">
    <printerLocation>Marketing 3rd floor east</printerLocation>
    <printerType>color laser 2400dpi</printerType>
    <paperType>glossy press release</paperType>
    <paperSize>letter</paperSize>
    <document>"\\WinAlways\c:\Results\Profits UP Again.xls"</document>
    <user>Joe Hypester</user>
</printRequest>

If the schema were static, printerLocation would likely be defined to be
some kind of string.  However, when the form is generated for the user, a
list of available, in-service printer locations could be retrieved from the
database, and, instead of having the user type in one, she could select from
the list.  The list could even be sorted to put printers known to be nearest
to the user's office near the top of the list.  In this case, generating a
schema on the fly for the PrinterLocationType as an enumeration and passing
that to the form generator would be one way to improve the presentation and
validation.  The schema cannot be static because it is the way of printers
to be out-of-service occasionally, and new ones to be added to the list
occasionally.  The template for the dynamic schema and the list of printer
locations could be merged using an XSLT in an XML-based schema language, but
this is a relatively minor benefit..

Jeff


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