contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
format item   %v    
Sample Code   Related Syntax    

Syntax

  %format-modifier* v (attribute-name)


Purpose

The "%v" format item is used to format attributes.

In element rules, the named attribute must be an attribute of the element; in external-data-entity rules, it must be a data attribute of the entity being processed. In all other rules the named attribute must be an attribute of the containing element.

The following modifiers can always be used with the "%v" format item:

If the attribute has a CDATA declared type, the following modifiers can be used:

If the attribute's declared type is entity or entities, and the entity name refers to an external entity, the following modifiers can also be specified:

These modifiers are combined as follows:

If an entity has no system identifier, then "e" acts like "ep" does. It is an error if either "e" or "ep" is used, and the entity has no system or public identifier bound by a library rule to a system identifier.

This format accesses letters within system and public identifiers in uppercase or lowercase as they appear in the entity declaration. Letters in element, entity, or notation names appear in uppercase or lowercase as they appear in the processed document, unless the SGML declaration specifies uppercase substitution for that class of name. If so, the name is accessed with letters forced to uppercase. Thus, in the Reference Concrete Syntax, by default, element and notation names appear in uppercase while entity names appear as entered in the document.

For an entities attribute, if the attribute value contains more than one entity name, the using prefix must be used to select one entity whose system or public identifier is to be manipulated or displayed.

If the value of an entity or entities attribute is the name of an internal CDATA or SDATA entity, the "%ev" format can be used to determine the replacement text of the internal entity.

The "e", "p", and "ep" formats can also be used with notation, under the same conditions as entity or entities.

This example illustrates how the "%ev" format handles internal and external entities differently.

The element "as-is" has a single required ENTITY attribute "text". The entity named by the attribute value simply provides the text that is to replace the element, wherever it occurs in a document.

  <!ELEMENT as-is - o EMPTY>
  <!ELEMENT as-is text ENTITY #REQUIRED>

The element rule for processing the "as-is" element does the following:

Note that "%ev" returns one of two things, depending on whether the entity named by the attribute to which it is applied is internal or external:


  element as-is
        do when attribute text is external
           output file "%ev(text)"
        else
           output "%ev(text)"
        done
     suppress

Sample Code  
   Shelves: using the attributes shelf for normalization
 
Related Syntax
   external-data-entity
   library
 
 
----  

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

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

Copyright © OmniMark Technologies Corporation, 1988-1999.