contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
Public identifiers: parsing  
Related Concepts  

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">



Sample

  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
 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:45 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.