RE: specifying attribute choice

"G. Ken Holman" <[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Message-ID <[email protected]>
At 2004-02-09 14:25 -0500, DuCharme, Bob (LNG-CHO) wrote:
>Thanks Ken! That worked. Maybe I was misunderstanding the problem of the
>original one, though, because the syntax of the solution still seems to tell
>me that multiple x attributes are OK in the element.

But that wouldn't be well-formed.  My reasoning was that a well-formedness 
checker would stop the XML instance before the semantics of RELAX-NG 
validation would kick in.  So the fact that the semantics might allow two 
"x" attributes is moot because it would never have the opportunity to check 
two "x" attributes.

So I figured that as long as the instance was well-formed, the content 
model would accommodate your stated requirements ... and it seems to work 
with Jing.

Perhaps I've made an improper assumption?  That was my gut answer to your 
question and it seemed to work.  Should I instead be going through the two 
two-pass processes suggested by Dave and John?  That seems more complex.

.................... Ken


--
Public courses: upcoming world tour of hands-on XSL training events
Each week:    Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO
Washington, DC: 2004-03-15            San Francisco, CA: 2004-03-22
Hong Kong: 2004-05-17    Germany: 2004-05-24    England: 2004-06-07
World-wide on-site corporate, government & user group XML training!

G. Ken Holman                  mailto:[email protected]
Crane Softwrights Ltd.           http://www.CraneSoftwrights.com/r/
Box 266, Kars, Ontario CANADA K0A-2E0     +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness   http://www.CraneSoftwrights.com/r/bc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.