RelaxNG/publidoc.rnc
changeset 256 2b36e6a5b587
parent 253 4df1612ba1c7
child 257 814f79990a58
equal deleted inserted replaced
255:3a9b70f0d4f7 256:2b36e6a5b587
    25 
    25 
    26 top.head = element head { top.head.content }
    26 top.head = element head { top.head.content }
    27 
    27 
    28 top.head.content =
    28 top.head.content =
    29    (title, shorttitle?, subtitle*)?
    29    (title, shorttitle?, subtitle*)?
    30  & (identifier, identifier?)?
    30  & identifier*
    31  & copyright*
    31  & copyright*
    32  & collection?
    32  & collection?
    33  & contributors?
    33  & contributors?
    34  & date?
    34  & date?
    35  & place?
    35  & place?
   541 
   541 
   542 title.content = inlines
   542 title.content = inlines
   543 
   543 
   544 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   544 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   545 
   545 
   546 identifier = element identifier {
   546 # ~~~~~~ identifier
   547    (attribute type { "ean" }, xsd:token {pattern = "\d{13}"})
   547 identifier = identifier.uri | identifier.ean
   548  | (attribute type { "uri" }, xsd:anyURI)
   548 
   549 }
   549 # ~~~~~~ identifier.uri
   550 
   550 identifier.uri = element identifier { identifier.uri.attributes }
   551 identifier.ean = element identifier {
   551 
   552    attribute type { "ean" }, xsd:token {pattern = "\d{13}"}
   552 identifier.uri.attributes =
   553 }
   553    type_uri.attribute
   554 
   554  & for.attribute?
   555 identifier.uri = element identifier {
   555 type_uri.attribute = attribute type { "uri" }, xsd:anyURI
   556    attribute type { "uri" }, xsd:anyURI
   556 
   557 }
   557 # ~~~~~~ identifier.ean
       
   558 identifier.ean = element identifier { identifier.ean.attributes }
       
   559 
       
   560 identifier.ean.attributes =
       
   561    type_ean.attribute
       
   562  & for.attribute?
       
   563 type_ean.attribute = attribute type { "ean" }, xsd:token {pattern = "\d{13}"}
   558 
   564 
   559 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   565 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   560 
   566 
   561 copyright = element copyright { copyright.content }
   567 copyright = element copyright { copyright.content }
   562 
   568