|        | |||||||||||
| 
 | 
Introduction
Formal public identifiers have a strict syntax that can easily be parsed using OmniMark patterns to extract the parts of interest to a particular application.
This external-text-entity rule assumes that all external text entities have a formal public identifier. It also assumes that the file containing the entity's text is formed by combining the public text description, a dot, and the lower-cased version of the first three letters of the public identifier's public text class.
This rule would output the file named "Chapter3.tex" when given a reference to an entity with the following declaration:
<!ENTITY ch3 PUBLIC "-//All Mine//TEXT Chapter3//EN">
  external-text-entity #implied
     do scan "%pq"
     match (["-+"] "//")?
           ([any except "/"]+ | "/" lookahead ! "/")* "//"
           [any except "%_"] {3} => class3 [any except " "]" " "-//"?
           ([any except "/"]+ | "/" lookahead ! "/")* => description
        output file "%x(description).%lx(class3)"
     done
| Related Concepts Public identifiers: parsing | 
| ---- |