RelaxNG/publiset.rnc
changeset 5 69310bc35b63
parent 2 417bb62f2a77
child 18 e448c6a000e5
equal deleted inserted replaced
4:1db220a61526 5:69310bc35b63
    68 
    68 
    69 metadata.attributes =
    69 metadata.attributes =
    70    remap.attributes
    70    remap.attributes
    71 
    71 
    72 metadata.content =
    72 metadata.content =
    73    title?,
    73    title?
    74    subtitle?,
    74  & subtitle?
    75    source?
    75  & author*
       
    76  & publisher?
       
    77  & language?
       
    78  & source?
    76 
    79 
    77 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    80 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    78 
    81 
    79 title = element title { title.content }
    82 title = element title { title.content }
    80 
    83 
    81 title.content = inlines
    84 title.content = inlines
    82 
    85 
    83 subtitle = element subtitle { title.content }
    86 subtitle = element subtitle { title.content }
       
    87 
       
    88 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ author, publisher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
    89 
       
    90 # ~~~~~~ author
       
    91 author = element author { author.content }
       
    92 
       
    93 author.content =
       
    94    firstname?,
       
    95    lastname
       
    96 
       
    97 # ~~~~~~ publisher
       
    98 publisher = element publisher { publisher.content }
       
    99 
       
   100 publisher.content = inlines
       
   101 
       
   102 # ~~~~~~ firstname
       
   103 firstname = element firstname { firstname.content }
       
   104 
       
   105 firstname.content = inlines
       
   106 
       
   107 # ~~~~~~ lastname
       
   108 lastname = element lastname { lastname.content }
       
   109 
       
   110 lastname.content = inlines
       
   111 
       
   112 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   113 
       
   114 language = element language { language.attributes }
       
   115 
       
   116 language.attributes = lang.attribute
       
   117 lang.attribute = attribute xml:lang { xsd:language }
    84 
   118 
    85 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   119 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    86 
   120 
    87 # ~~~~~~ source
   121 # ~~~~~~ source
    88 source = element source {
   122 source = element source {