<content>
<content> (模型宣告) 包含所記錄之模型的宣告文字。 [22.5 Element Specifications] | |||||||||
組件 | tagdocs — Documentation Elements | ||||||||
屬性 | att.global (@xml:id, @n, @xml:lang, @xml:base, @xml:space) (att.global.rendition (@rend, @style, @rendition)) (att.global.linking (@corresp, @synch, @sameAs, @copyOf, @next, @prev, @exclude, @select)) (att.global.analytic (@ana)) (att.global.facs (@facs)) (att.global.change (@change)) (att.global.responsibility (@cert, @resp)) (att.global.source (@source))
|
||||||||
可包含在於 |
tagdocs: dataSpec elementSpec macroSpec moduleRef
|
||||||||
可包含 | ANY | ||||||||
例子 | |||||||||
Schematron | A temporary constraint to give users a warning that in the future the content of content will be restricted to 1 and only 1 child element.
<sch:rule context="tei:content[ *[2] ]"> <sch:let name="tot_kids" value="count( * )"/> <sch:let name="tei_kids" value="count( tei:* )"/> <sch:let name="rng_kids" value="count( rng:* | rna:* )"/> <sch:let name="msg_part01" value="'In the near future the <content> element will be limited to 1 and only 1 child element. '"/> <sch:let name="msg_part02" value="'This <content> element is in '"/> <sch:let name="msg_part03" value="if ( local-name(..) eq 'elementSpec' ) then 'an ' else 'a '"/> <sch:let name="msg_part04" value="concat( local-name(..), ' with ' )"/> <sch:let name="msg_part05" value="if ( parent::tei:moduleRef/@key ) then 'a @key' else ''"/> <sch:let name="msg_part06" value="if ( parent::tei:moduleRef/@url ) then 'a @url' else ''"/> <sch:let name="msg_part07" value="if ( parent::tei:*/@ident ) then 'an @ident' else ''"/> <sch:let name="msg_part08" value="' of "'"/> <sch:let name="msg_part09" value="../@ident | ../@key | ../@url"/> <sch:let name="msg_part10" value="concat('" and has ', $tot_kids, ' children,')"/> <sch:let name="msgs_1to10" value="concat( $msg_part01, $msg_part02, $msg_part03, $msg_part04, $msg_part05, $msg_part06, $msg_part07, $msg_part08, $msg_part09, $msg_part10 )"/> <sch:report test="$tei_kids eq $tot_kids" role="warning"> <sch:value-of select="$msgs_1to10"/> which could be wrapped in a <sequence> element. </sch:report> <sch:report test="$rng_kids eq $tot_kids" role="warning"> <sch:value-of select="$msgs_1to10"/> which could be wrapped in an <rng:div> element. </sch:report> <sch:assert test="$tei_kids eq $tot_kids or $rng_kids eq $tot_kids" role="warning"> <sch:value-of select="$msgs_1to10"/> but those children are neither all TEI elements nor all RELAX NG elements, and thus this <content> is invalid and can not be easily rectified. </sch:assert> </sch:rule> |
||||||||
Content model |
<content> |
||||||||
宣告 |
<rng:element name="content"> element content { att.global.attributes, att.global.rendition.attributes, att.global.linking.attributes, att.global.analytic.attributes, att.global.facs.attributes, att.global.change.attributes, att.global.responsibility.attributes, att.global.source.attributes, attribute autoPrefix { "true" | "false" }?, ( valList | model.contentPart+ | anyElement-content+ ) } |