% $Id: XMLEntity.html,v 1.1 2003/10/01 07:22:16 connolly Exp $
%

References

  1. XML Information Set
    Working Draft of August 30, 1999
    Editors: John Cowan, David Megginson
%

XMLEntity: trait
    includes
        URI,
        XMLInfoSetBasics,

        Set(PublicIdentifier, FiniteSet[PublicIdentifier] for Set[E]),
        Set(NotationItem, FiniteSet[NotationItem] for Set[E]),
        Set(absoluteURI, FiniteSet[absoluteURI] for Set[E]),
        List(EntityItem)

% 2.9. Entity Information Items
        EntityKind enumeration of general, parameter, unparsed
        EntityType tuple of kind: EntityKind, external: Bool
        
    introduces
% under 2.2. Element Information Items
        source: Item → EntityItem %@@REVIEW: generic to all items

% 2.9. Entity Information Items
%@@REVIEW: move "There is at most one entity information item
% for each general entity, ..." under document item's entities property
        type: EntityItem → EntityType %@@REVIEW entitytypes externalDTD and
% documentEntity are modelled by
% the relationship of other items
% to this item
        name: EntityItem → Name %@@REVIEW: null is not an XML Name! model null by underspecification
        systemIdentifier: EntityItem → absoluteURI
        publicIdentifier: EntityItem → FiniteSet[PublicIdentifier] %@@REVIEW: public identifier is what... sequence of characters?
        notation: EntityItem → NotationItem % we can represent null by underspecification in this case
        content: EntityItem → Content % @@REVIEW: content is... what? sequence of characters?
%source... @@hmm... in order for generic definition of source to work, EntityItems have to be children of DTDItems, and we need to model parameter entities with markers.
        charset: EntityItem → CharacterEncodingName %@@REVIEW: this should be a URI (i.e. we should change the MIME spec). But perhaps not today ;-)
        standalone: EntityItem → Bool %@@REVIEW: "not present"? it defaults to no, per 2.9 Standalone Document Declaration

% 2.10. Notation Information Items
        name: NotationItem → Name
        systemIdentifier: NotationItem → FiniteSet[absoluteURI]
        publicIdentifier: NotationItem → FiniteSet[PublicIdentifier]
% source... @@REVIEW: notations must be children of DTDs too!
% reference to the *external* entity item ...?
%@@REVIEW: model the fact that no two notations have the same name?
% i.e. make notations(dtd) a FiniteMap?

% 2.11 entity start/end items
%@@REVIEW: why conflate CDATA section markers with these?
% if you're going to do that, call them start/end markers,
% not entity start/end markers
        end: EntityStartMarkerItem → EntityEndMarkerItem
        start: EntityEndMarkerItem → EntityStartMarkerItem
        entity: EntityStartMarkerItem → EntityItem %@@null?


    asserts
        ∀ et: EntityType,
                noti: NotationItem

% 2.9. Entity Information Items
        et.kind = unparsed ⇒ et.external;

% 2.10. Notation Information Items
        size(systemIdentifier(noti)) <= 1;
        size(publicIdentifier(noti)) <= 1;

[Index]


HTML generated using lsl2html.