LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives

XML-L Archives

XML-L Archives


Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font


Join or Leave XML-L
Reply | Post New Message
Search Archives

Subject: Re: Tieing a complex type to the attribute of an element
From: Keith R Wood <[log in to unmask]>
Reply-To:[log in to unmask]
Date:Fri, 28 Jul 2006 16:46:16 -0400

text/plain (30 lines)

Thanks for the feed-back. I have learned a lot about this today, after you told me the proper name for what I am trying to do.

Thank you,


 --- On Fri 07/28, G. Ken Holman < [log in to unmask] > wrote:

From: G. Ken Holman [mailto: [log in to unmask]]

To: [log in to unmask]

Date: Fri, 28 Jul 2006 10:14:27 -0400

Subject: Re: Tieing a complex type to the attribute of an element

At 2006-07-28 08:53 -0400, Keith R Wood wrote:>I am trying to define a document that has the >elements of a node, dependent on an attribute of the node.That is called "a co-occurrence constraint".>For example:><PARTY type="lender">>    :>    :></PARTY>><PARTY type="seller">>    :>    :><PARTY>>>I have a complex type that defines my buyer, and >a complex type that defines my lender.Sounds to me like you are using W3C Schema ... that technology does not accommodate co-occurrence constraints.>I want to define my schema so that the allowable >elements within PARTY are dependent on the type >attribute. I am not sure how to do this, or if it can be done.In can be done with RELAX-NG:element PARTY {  (   (    attribute type { "lender" },    ...   ) |   (    attribute type ( "seller" },    ...   )  )I hope this helps.. . . . . . . . . . Kenp.s. given your example attribute values, are you perhaps trying to re-invent business documents such as invoice, purchase order, etc?  If so, you 
could consider using UBL: ... it is a license-free unencumbered suite of 31 document types for business documents--UBL/XML/XSLT/XSL-FO training:         Vårø, Denmark 06-09-25/10-06World-wide corporate, govt. & user group UBL, XSL, & XML training.G. Ken Holman                 mailto:[log in to unmask] Softwrights Ltd. 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)Male Cancer Awareness Aug'05 business disclaimers:

Join Excite! -
The most personalized portal on the Web!

Back to: Top of Message | Previous Page | Main XML-L Page



CataList Email List Search Powered by the LISTSERV Email List Manager