# Constraints for an XPath file enumerating all of the possible # elements and attributes described by a W3C Schema expression. # Note this expression has limitations (e.g. mixed content cannot # be expressed). # $Id: xpath.rnc,v 1.7 2005/05/31 02:24:57 G. Ken Holman Exp $ # Copyright (C) OASIS Open (2005). All Rights Reserved. # This document and translations of it may be copied and furnished # to others, and derivative works that comment on or otherwise # explain it or assist in its implementation may be prepared, # copied, published and distributed, in whole or in part, without # restriction of any kind, provided that the above copyright notice # and this paragraph are included on all such copies and derivative # works. However, this document itself may not be modified in any # way, such as by removing the copyright notice or references to # OASIS, except as needed for the purpose of developing OASIS # specifications, in which case the procedures for copyrights # defined in the OASIS Intellectual Property Rights document must # be followed, or as required to translate it into languages other # than English. # The limited permissions granted above are perpetual and will not # be revoked by OASIS or its successors or assigns. # This document and the information contained herein is provided # on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE # USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY # IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR # PURPOSE. datatypes d = "http://www.w3.org/2001/XMLSchema-datatypes" namespace x = "urn:oasis:names:tc:ubl:schema:XPath-1.0" start = element x:XPath # container for all xpath information { attribute id { text }, #identification of instance as a resource e #cannot name the pattern "element" so use "e" for short } e = element x:Element { # name information attribute name { d:Name }, ( attribute prefix { text }, attribute uri { d:anyURI }? )?, # data type attribute type { d:Name }, # cardinality attribute minOccurs { d:integer }, attribute maxOccurs { d:integer | "unbounded" }, # mixed content attribute text { "" }?, # attributes attached to the element element x:Attribute { attribute name { d:Name }, attribute use { "optional" | "required" }, attribute type { d:Name } }*, # element content e*, # this only exists if the named element is already in the ancestry attribute loop { d:Name }? } # end of file