RelaxNG/publidoc.rnc
changeset 36 d23cfb7be79e
parent 35 de4114d12ef1
child 37 83b7ec3c3132
equal deleted inserted replaced
35:de4114d12ef1 36:d23cfb7be79e
   130 # ~~~~~~ publisher
   130 # ~~~~~~ publisher
   131 publisher = element publisher { publisher.content }
   131 publisher = element publisher { publisher.content }
   132 
   132 
   133 publisher.content =
   133 publisher.content =
   134    label,
   134    label,
   135    url?
   135    link?
   136 
   136 
   137 # ~~~~~~ firstname
   137 # ~~~~~~ firstname
   138 firstname = element firstname { firstname.content }
   138 firstname = element firstname { firstname.content }
   139 
   139 
   140 firstname.content = inlines
   140 firstname.content = inlines
   153 role = element role { role.attributes }
   153 role = element role { role.attributes }
   154 
   154 
   155 role.attributes =
   155 role.attributes =
   156    role.of.attribute
   156    role.of.attribute
   157 role.of.attribute = attribute of { "author" | "illustrator" }
   157 role.of.attribute = attribute of { "author" | "illustrator" }
   158 
       
   159 # ~~~~~~ url
       
   160 url = element url { url.content }
       
   161 
       
   162 url.content = xsd:anyURI
       
   163 
   158 
   164 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   159 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   165 
   160 
   166 place = element place { place.content }
   161 place = element place { place.content }
   167 
   162 
   418 
   413 
   419 media.content =
   414 media.content =
   420    block.head?,
   415    block.head?,
   421    image+,
   416    image+,
   422    caption?,
   417    caption?,
   423    url?
   418    link?
   424 
   419 
   425 # ~~~~~~ image
   420 # ~~~~~~ image
   426 image = element image { image.attributes, image.content }
   421 image = element image { image.attributes, image.content }
   427 
   422 
   428 image.attributes =
   423 image.attributes =
   478 number.value.attribute = attribute value { xsd:integer | xsd:decimal }
   473 number.value.attribute = attribute value { xsd:integer | xsd:decimal }
   479 
   474 
   480 number.content = mixed { sup* }
   475 number.content = mixed { sup* }
   481 number.roman.content = xsd:token {pattern = "[dlxvi]+"}
   476 number.roman.content = xsd:token {pattern = "[dlxvi]+"}
   482 
   477 
   483 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   478 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   484 
   479 
   485 date = element date { date.attributes, date.content }
   480 date = element date { date.attributes, date.content }
   486 
   481 
   487 date.attributes =
   482 date.attributes =
   488    date.value.attribute
   483    date.value.attribute
   490 date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear }
   485 date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear }
   491 date.of.attribute = attribute of { "birth" | "death" }
   486 date.of.attribute = attribute of { "birth" | "death" }
   492 
   487 
   493 date.content = mixed { sup* }
   488 date.content = mixed { sup* }
   494 
   489 
   495 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   490 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   496 
   491 
   497 name = element name { name.attributes, name.content }
   492 name = element name { name.attributes, name.content }
   498 
   493 
   499 name.attributes =
   494 name.attributes =
   500    name.of.attribute?
   495    name.of.attribute?
   501 name.of.attribute = attribute of
   496 name.of.attribute = attribute of
   502    { "person" | "company" | "book" | "newspaper" | "party" }
   497    { "person" | "company" | "book" | "newspaper" | "party" }
   503 
   498 
   504 name.content = inlines
   499 name.content = inlines
   505 
   500 
   506 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   501 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   507 
   502 
   508 note = element note { note.attributes, note.content }
   503 note = element note { note.attributes, note.content }
   509 
   504 
   510 note.attributes =
   505 note.attributes =
   511    note.label.attribute?
   506    note.label.attribute?
   513 
   508 
   514 note.content =
   509 note.content =
   515    inlines
   510    inlines
   516  | p+
   511  | p+
   517 
   512 
   518 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   513 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   519 
   514 
   520 foreign = element foreign { foreign.attributes, foreign.content }
   515 foreign = element foreign { foreign.attributes, foreign.content }
   521 
   516 
   522 foreign.attributes =
   517 foreign.attributes =
   523    lang.attribute?
   518    lang.attribute?
   524 
   519 
   525 foreign.content = inlines
   520 foreign.content = inlines
   526 
   521 
   527 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   522 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   528 
   523 
   529 highlight = element highlight { highlight.content }
   524 highlight = element highlight { highlight.content }
   530 
   525 
   531 highlight.content = inlines
   526 highlight.content = inlines
   532 
   527 
   533 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   528 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   534 
   529 
   535 mentioned = element mentioned { mentioned.content }
   530 mentioned = element mentioned { mentioned.content }
   536 
   531 
   537 mentioned.content = inlines
   532 mentioned.content = inlines
   538 
   533 
   539 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   534 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   540 
   535 
   541 quote = element quote { quote.content }
   536 quote = element quote { quote.content }
   542 
   537 
   543 quote.content = inlines
   538 quote.content = inlines
   544 
   539 
   545 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   540 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   546 
   541 
   547 acronym = element acronym { acronym.content }
   542 acronym = element acronym { acronym.content }
   548 
   543 
   549 acronym.content = inlines
   544 acronym.content = inlines
   550 
   545 
   551 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   546 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   552 
   547 
   553 term = element term { term.content }
   548 term = element term { term.content }
   554 
   549 
   555 term.content = inlines
   550 term.content = inlines
   556 
   551 
   557 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   552 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   558 
   553 
   559 link = element link { link.attributes, link.content }
   554 link = element link { link.attributes, link.content }
   560 
   555 
   561 link.attributes =
   556 link.attributes =
   562    (uri.attribute | idref.attribute)?
   557    uri.attribute
       
   558  | idref.attribute
   563 uri.attribute = attribute uri { xsd:anyURI }
   559 uri.attribute = attribute uri { xsd:anyURI }
   564 idref.attribute = attribute idref { xsd:IDREF }
   560 idref.attribute = attribute idref { xsd:IDREF }
   565 
   561 
   566 link.content = inlines
   562 link.content = inlines