Re: Root element

Yes, thank you.  In general I would somewhat PREFER it if you would do 
appropriate editing on Q&A that are adapted for FAQ.   In some cases, I 
think the wording doesn't quite hold up.  Feel free to take a crack at 
cleaning up earlier entries you adapted from my responses as you see fit. 
If there are any where you worry about changing the meaning, just send a 
heads up and I will check them.  Many thanks.

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------







Francis Norton <francis@redrice.com>
Sent by: xmlschema-dev-request@w3.org
02/16/2001 08:08 AM
Please respond to francis

 
        To:     Noah_Mendelsohn@lotus.com
        cc:     Michael Shapiro <michael@creativescience.com>, xmlschema-dev@w3.org, 
xmlschema-dev-request@w3.org
        Subject:        Re: Root element


Thanks, Noah. I've updated the FAQ with this, though I've changed the Q.
to 

"Can the message reader force a specific global element to be the
message root?"

and the first sentence of the reply, because I want to make the three
roles - schema author, message author, and message reader - more
explicit.

Hope that's OK -

Francis.

Noah_Mendelsohn@lotus.com wrote:
> 
> I thought the FAQ covered this case, but I checked and it does not do so
> in detail [1].  Here's a bit more info:
> 
> Q. Can any global element serve as the root of your instance when you
> validate?
> A.  Yes, as far as the schema language itself is concerned, but it is
> intended that the application or processor could be parameterized to
> check.  For example, consider a perfectly reasonable processor that 
would
> take a command line like:
> 
>         validate -instance myinstance.xml -schema myschema.xsd
> -rootElementName purchaseOrder
> 
> such a processor could provide the added service of checking the name of
> the root element.  There are at least two reasons that the schema 
language
> does not take a more rigid view of roots (a) there are situations in 
which
> you truly find it useful to have different element names serve as the 
root
> of  a document and (b) even if purchaseOrder is the root of the 
instance,
> you may decide that you only want to validate the shippingAddress.   So,
> the root of the validation need not be the root of the instance 
document.
> 
> Hope this helps.
> 
> [1] http://redrice.com/schemavalid/faq/xml-schema.html#d3
>

Received on Friday, 16 February 2001 11:14:09 UTC