RelaxNG/publidoc.rnc
changeset 189 951f1a25efc5
parent 188 b9fea8bd2412
child 190 546609a92447
equal deleted inserted replaced
188:b9fea8bd2412 189:951f1a25efc5
    70 
    70 
    71 top.topic.content =
    71 top.topic.content =
    72    top.head?,
    72    top.head?,
    73    header?,
    73    header?,
    74    section+,
    74    section+,
       
    75    bibliography?,
    75    footer?
    76    footer?
    76 
    77 
    77 
    78 
    78 # =============================================================================
    79 # =============================================================================
    79 #                                 DIVISION LEVEL
    80 #                                 DIVISION LEVEL
   127 
   128 
   128 topic.content =
   129 topic.content =
   129    component.head?,
   130    component.head?,
   130    header?,
   131    header?,
   131    section+,
   132    section+,
       
   133    bibliography?,
   132    footer?
   134    footer?
   133 
   135 
   134 
   136 
   135 # =============================================================================
   137 # =============================================================================
   136 #                                 SECTION LEVEL
   138 #                                 SECTION LEVEL
   167  & keywordset?
   169  & keywordset?
   168  & subjectset?
   170  & subjectset?
   169  & abstract?
   171  & abstract?
   170  & audio*
   172  & audio*
   171  & annotation*
   173  & annotation*
       
   174 
       
   175 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bibliography ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   176 
       
   177 # ~~~~~~ bibliography
       
   178 bibliography = element bibliography { bibliography.content }
       
   179 
       
   180 bibliography.content =
       
   181    bibliography.entry+
   172 
   182 
   173 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   183 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   174 
   184 
   175 footer = element footer { footer.content }
   185 footer = element footer { footer.content }
   176 
   186 
   302 row.attributes =
   312 row.attributes =
   303    valign.attribute?
   313    valign.attribute?
   304  & rowsep.attribute?
   314  & rowsep.attribute?
   305 
   315 
   306 row.content =
   316 row.content =
   307   entry+
   317   table.entry+
   308 
   318 
   309 # ~~~~~~ entry
   319 # ~~~~~~ table.entry
   310 entry = element entry { entry.attributes, entry.content }
   320 table.entry = element entry { table.entry.attributes, table.entry.content }
   311 
   321 
   312 entry.attributes =
   322 table.entry.attributes =
   313    align.attribute?
   323    align.attribute?
   314  & valign.attribute?
   324  & valign.attribute?
   315  & colsep.attribute?
   325  & colsep.attribute?
   316  & rowsep.attribute?
   326  & rowsep.attribute?
   317 
   327 
   318 entry.content =
   328 table.entry.content =
   319    inlines
   329    inlines
   320  | (p | media)+
   330  | (p | media)+
   321 
   331 
   322 # ~~~~~~ table.caption
   332 # ~~~~~~ table.caption
   323 table.caption = element caption { caption.content }
   333 table.caption = element caption { caption.content }
   396 
   406 
   397 caption.attributes =
   407 caption.attributes =
   398    x.attribute?
   408    x.attribute?
   399  & y.attribute?
   409  & y.attribute?
   400 
   410 
       
   411 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bibliograpgy.entry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   412 
       
   413 # ~~~~~~ bibliography.entry
       
   414 bibliography.entry = element entry { bibliography.entry.content }
       
   415 
       
   416 bibliography.entry.content =
       
   417    identifier.ean?
       
   418  & title
       
   419  & subtitle?
       
   420  & copyright?
       
   421  & collection?
       
   422  & contributors?
       
   423  & date?
       
   424  & place?
       
   425  & folio?
       
   426  & pages?
       
   427 
       
   428 # ~~~~~~ folio
       
   429 folio = element folio { folio.content }
       
   430 
       
   431 folio.content = xsd:positiveInteger | xsd:token {pattern = "[DLXVI]+"}
       
   432 
       
   433 # ~~~~~~ pages
       
   434 pages = element pages { pages.content }
       
   435 
       
   436 pages.content = xsd:positiveInteger
       
   437 
   401 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scenario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   438 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scenario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   402 
   439 
   403 # ~~~~~~ scenario
   440 # ~~~~~~ scenario
   404 scenario = element scenario { scenario.content }
   441 scenario = element scenario { scenario.content }
   405 
   442 
   505 
   542 
   506 place.content = inlines
   543 place.content = inlines
   507 
   544 
   508 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   545 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   509 
   546 
   510 # ~~~~~~ source
       
   511 source = element source {
   547 source = element source {
   512    (  (attribute type { "book" }, source.content.book)
   548    (  (attribute type { "book" }, bibliography.entry.content)
   513     | (attribute type { "file" }, source.content.file)),
   549     | (attribute type { "file" }, source.content.file)),
   514    source.content
   550    source.content
   515 }
   551 }
   516 
   552 
   517 source.content.book =
       
   518    identifier.ean,
       
   519    title?,
       
   520    pagenumber*
       
   521 source.content.file =
   553 source.content.file =
   522    identifier.uri
   554    identifier.uri
   523 source.content =
   555 source.content =
   524    annotation*
   556    annotation*
   525 
   557 
   526 # ~~~~~~ pagenumber
   558 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   527 pagenumber = element pagenumber { pagenumber.content }
       
   528 
       
   529 pagenumber.content = xsd:positiveInteger
       
   530 
       
   531 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   532 
   559 
   533 # ~~~~~~ keywordset
   560 # ~~~~~~ keywordset
   534 keywordset = element keywordset { keywordset.content }
   561 keywordset = element keywordset { keywordset.content }
   535 
   562 
   536 keywordset.content = keyword+
   563 keywordset.content = keyword+