456 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
456 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
457 |
457 |
458 inlines = mixed { |
458 inlines = mixed { |
459 sup* |
459 sup* |
460 & sub* |
460 & sub* |
|
461 & var* |
461 & number* |
462 & number* |
|
463 & math* |
462 & date* |
464 & date* |
463 & name* |
465 & name* |
464 & note* |
466 & note* |
465 & foreign* |
467 & foreign* |
466 & highlight* |
468 & highlight* |
467 & mentioned* |
469 & mentioned* |
468 & quote* |
470 & quote* |
469 & acronym* |
471 & acronym* |
470 & term* |
472 & term* |
471 & link* |
473 & link* |
472 } |
474 & anchor* |
473 |
475 } |
474 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
476 |
475 |
477 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup, var ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
476 sup = element sup { inlines } |
478 |
477 |
479 sup = element sup { text } |
478 sub = element sub { inlines } |
480 |
|
481 sub = element sub { text } |
|
482 |
|
483 var = element var { text } |
|
484 |
|
485 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ math ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
486 |
|
487 math = element math { |
|
488 ( attribute notation {"tex"}, math.attributes, math.tex.content ) |
|
489 | ( math.attributes, math.content) |
|
490 } |
|
491 |
|
492 math.attributes = |
|
493 wide.attribute? |
|
494 wide.attribute = attribute wide { xsd:boolean } |
|
495 |
|
496 math.content = mixed { sup* & sub* & var* } |
|
497 math.tex.content = text |
479 |
498 |
480 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
499 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
481 |
500 |
482 number = element number { |
501 number = element number { |
483 ( attribute type {"roman"}, number.attributes, number.roman.content ) |
502 ( attribute type {"roman"}, number.attributes, number.roman.content ) |
568 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
587 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
569 |
588 |
570 link = element link { link.attributes, link.content } |
589 link = element link { link.attributes, link.content } |
571 |
590 |
572 link.attributes = |
591 link.attributes = |
573 uri.attribute |
592 (uri.attribute | idref.attribute) |
574 | idref.attribute |
593 & anchor.attribute? |
575 uri.attribute = attribute uri { xsd:anyURI } |
594 uri.attribute = attribute uri { xsd:anyURI } |
576 idref.attribute = attribute idref { xsd:IDREF } |
595 idref.attribute = attribute idref { xsd:IDREF } |
|
596 anchor.attribute = attribute anchor { xsd:NCName } |
577 |
597 |
578 link.content = inlines |
598 link.content = inlines |
|
599 |
|
600 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ anchor ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
601 |
|
602 anchor = element anchor { |
|
603 ( anchor.attributes, anchor.content ) |
|
604 | ( attribute startref { xsd:IDREF } ) |
|
605 } |
|
606 |
|
607 anchor.attributes = |
|
608 anchor.id.attribute |
|
609 anchor.id.attribute = attribute xml:id { xsd:ID } |
|
610 |
|
611 anchor.content = inlines |