W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2000

RE: Providing a value for attributes defined with use="required"

From: Gino Basso <GBasso@ware2.com>
Date: Tue, 28 Nov 2000 09:33:54 -0500
Message-ID: <8022A77178C84548B49F5965D38776C805F331@wopr.ware2.com>
To: "'Mike_Leditschke@nemmco.com.au'" <Mike_Leditschke@nemmco.com.au>
Cc: xmlschema-dev@w3.org, xmlschema-dev-request@w3.org

Another option, then, might be to derive a simple type whose only allowed
value is this particular 'version' string.

As to the question of whether there is an inconsistency between the primer
and the spec I'll defer to a more 'qualified' respondent (although there is
a sort of 'disclaimer' at the beginning of the primer about it being


-----Original Message-----
From: Mike_Leditschke@nemmco.com.au
Sent: Sunday, November 26, 2000 7:53 PM
To: Gino Basso
Cc: xmlschema-dev@w3.org; xmlschema-dev-request@w3.org
Subject: Re: Providing a value for attributes defined with

The attribute concerned is part of a versioning scheme. We require the
attribute to ensure the
sender warrants the version of the transaction being sent rather than
relying on the schema
providing one. The requirement for a single value is a cross check against
the namespace specified
which indirectly will imply a particular version of the transaction.

I had considered your option but want the generator of the transaction to
explicitly indicate their intention.

I was using the 3.5 beta to do the testing.

My question was as much about the inconsistency between the primer and the
spec as it was about my
particular requirements.



                    Gino Basso

                    <GBasso@ware2.com>        To:
"'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>             
                    Sent by:                  cc:

                    xmlschema-dev-requ        Subject:     Re: Providing a
value for attributes defined with use  
                    est@w3.org                ="required"



                    25/11/2000 08:31



Mike Leditschke wrote:

> I wish to have an attribute which is both required and has a specific

> According to the primer section 2.2, table 1, second row, I should
this as

> <attribute name="foo" type="string" use="required" value="r2"/>

To me the two contraints are contradictory (requiring the attribute and
allowing a fixed value). You might consider the following instead:

    <attribute name="foo" type="string" use="fixed" value="r2" />

Although the appearance of a 'foo' attribute is optional, it's value must
'r2' if it does appear. Further, if it does not appear a schema processor
will create a 'foo' attribute with this value. This would seem to
what you want.

BTW, were you using the new beta version (3.5) of XMLSpy to validate your
schema? I wonder to what extent they have implemented the spec?

Received on Tuesday, 28 November 2000 09:34:07 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:49 UTC