RelaxNG/publidoc.rnc
changeset 43 5be33d03941a
parent 42 32381a87f807
child 44 ae64c01c37f1
equal deleted inserted replaced
42:32381a87f807 43:5be33d03941a
   432 # ~~~~~~ media
   432 # ~~~~~~ media
   433 media = element media { media.content }
   433 media = element media { media.content }
   434 
   434 
   435 media.content =
   435 media.content =
   436    block.head?,
   436    block.head?,
   437    image+,
   437    (image | sound)+,
   438    caption?,
   438    caption?,
   439    link?
   439    link?
   440 
   440 
   441 # ~~~~~~ image
   441 # ~~~~~~ image
   442 image = element image { image.attributes, image.content }
   442 image = element image { image.attributes, image.content }
   445    media.id.attribute
   445    media.id.attribute
   446 media.id.attribute = attribute id { xsd:NMTOKEN }
   446 media.id.attribute = attribute id { xsd:NMTOKEN }
   447 
   447 
   448 image.content =
   448 image.content =
   449    copyright?
   449    copyright?
       
   450 
       
   451 # ~~~~~~ sound
       
   452 sound = element sound { sound.attributes }
       
   453 
       
   454 sound.attributes =
       
   455    media.id.attribute
   450 
   456 
   451 
   457 
   452 # =============================================================================
   458 # =============================================================================
   453 #                                 INLINE LEVEL
   459 #                                 INLINE LEVEL
   454 # =============================================================================
   460 # =============================================================================
   588 
   594 
   589 link = element link { link.attributes, link.content }
   595 link = element link { link.attributes, link.content }
   590 
   596 
   591 link.attributes =
   597 link.attributes =
   592    (uri.attribute | idref.attribute)
   598    (uri.attribute | idref.attribute)
   593  & anchor.attribute?
       
   594 uri.attribute = attribute uri { xsd:anyURI }
   599 uri.attribute = attribute uri { xsd:anyURI }
   595 idref.attribute = attribute idref { xsd:IDREF }
   600 idref.attribute = attribute idref { xsd:IDREF }
   596 anchor.attribute = attribute anchor { xsd:NCName }
       
   597 
   601 
   598 link.content = inlines
   602 link.content = inlines
   599 
   603 
   600 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ anchor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   604 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ anchor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   601 
   605 
   602 anchor = element anchor {
   606 anchor = element anchor { anchor.attributes }
   603    ( anchor.attributes, anchor.content )
       
   604  | ( attribute startref { xsd:IDREF } )
       
   605 }
       
   606 
   607 
   607 anchor.attributes =
   608 anchor.attributes =
   608    anchor.id.attribute
   609    anchor.id.attribute
   609 anchor.id.attribute = attribute xml:id { xsd:ID }
   610 anchor.id.attribute = attribute xml:id { xsd:ID }
   610 
       
   611 anchor.content = inlines