W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2001

Re: Forcing a certain document element

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Fri, 12 Jan 2001 18:15:20 +0100
Message-ID: <3A5F3BA8.74C89B18@dyomedea.com>
To: Ian Stokes-Rees <ian@decisionsoft.com>
CC: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Ian Stokes-Rees wrote:
> 
.../...
> And I would like this XML document to validate:
> 
> <documentElement>
>   <someRefElement foo="1" bar="2"/>
> </documentElement>
> 
> But not have this validate:
> 
> <someRefElement foo="1" bar="2" />
> 
> (where "someRefElement" is the document element).
> 
> How can I use XSDL to enforce this?

You can specify the doctype in the document prolog (using a good old
doctype definition) or make sure that the definition of "someRefElement"
isn't global.

Eric



> Ian.
> --
> ian.stokes-rees@decisionsoft.com          tel: +1865 203 192
> DecisionSoft Ltd.                         fax: +1865 203 194
> www.decisionsoft.com                      Oxford, UK, OX2 OEA

-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------
Received on Friday, 12 January 2001 12:21:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:19 GMT