RelaxNG/publiset.rnc
changeset 36 d23cfb7be79e
parent 35 de4114d12ef1
child 38 3c8b406be906
equal deleted inserted replaced
35:de4114d12ef1 36:d23cfb7be79e
   125 # ~~~~~~ publisher
   125 # ~~~~~~ publisher
   126 publisher = element publisher { publisher.content }
   126 publisher = element publisher { publisher.content }
   127 
   127 
   128 publisher.content =
   128 publisher.content =
   129    label,
   129    label,
   130    url?
   130    link?
   131 
   131 
   132 # ~~~~~~ firstname
   132 # ~~~~~~ firstname
   133 firstname = element firstname { firstname.content }
   133 firstname = element firstname { firstname.content }
   134 
   134 
   135 firstname.content = inlines
   135 firstname.content = inlines
   148 role = element role { role.attributes }
   148 role = element role { role.attributes }
   149 
   149 
   150 role.attributes =
   150 role.attributes =
   151    role.of.attribute
   151    role.of.attribute
   152 role.of.attribute = attribute of { "author" | "illustrator" }
   152 role.of.attribute = attribute of { "author" | "illustrator" }
   153 
       
   154 # ~~~~~~ url
       
   155 url = element url { url.content }
       
   156 
       
   157 url.content = xsd:anyURI
       
   158 
   153 
   159 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   154 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   160 
   155 
   161 # ~~~~~~ source
   156 # ~~~~~~ source
   162 source = element source {
   157 source = element source {
   241  & remap.attributes
   236  & remap.attributes
   242 selection.file.attributes =
   237 selection.file.attributes =
   243    name.attribute
   238    name.attribute
   244  & uri.attribute?
   239  & uri.attribute?
   245 name.attribute = attribute name { xsd:anyURI }
   240 name.attribute = attribute name { xsd:anyURI }
   246 uri.attribute = attribute uri { xsd:anyURI }
       
   247 
   241 
   248 file.content = inlines
   242 file.content = inlines
   249 
       
   250 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   251 
       
   252 link = element link { link.attributes, link.content }
       
   253 
       
   254 link.attributes =
       
   255    uri.attribute
       
   256 
       
   257 link.content = inlines
       
   258 
   243 
   259 
   244 
   260 # =============================================================================
   245 # =============================================================================
   261 #                                 INLINE LEVEL
   246 #                                 INLINE LEVEL
   262 # =============================================================================
   247 # =============================================================================
   271 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   256 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   272 
   257 
   273 sup = element sup { inlines }
   258 sup = element sup { inlines }
   274 
   259 
   275 sub = element sub { inlines }
   260 sub = element sub { inlines }
       
   261 
       
   262 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       
   263 
       
   264 link = element link { link.attributes, link.content }
       
   265 
       
   266 link.attributes =
       
   267    uri.attribute
       
   268 uri.attribute = attribute uri { xsd:anyURI }
       
   269 
       
   270 link.content = inlines
   276 
   271 
   277 
   272 
   278 # =============================================================================
   273 # =============================================================================
   279 #                               REMAP ATTRIBUTES
   274 #                               REMAP ATTRIBUTES
   280 # =============================================================================
   275 # =============================================================================