Package eu.bandm.tools.dtd
Class AttlistIndex
java.lang.Object
eu.bandm.tools.dtd.AttlistIndex
Maintains for one given
Errors are issued to the message channel
DTD.Dtd
a map from element names into
DTD.Attlist
s. For a certain element name: Iff there are
one ore more DTD.Attlist
s in the original dtd, then
in the map is exactly one(1) fresh DTD.Attlist
object,
containing all attribute declarations.
Errors are issued to the message channel
- if a set of known element names is given and an attribute list refers to an element name not contained therein.
- if an attribute name appears more than once in an Attlist.
- if more than one attributes in the same attlist are of type "ID".
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAttlist
(String name) Return the (one and only, unified)DTD.Attlist
object for a given element name ("tag").Returns the names of all elements with attributesReturns theDTD.Dtd
which this object reflects.boolean
isFragmented
(String name) Returns whether the attribute with the given name has been declared in more than one (>1) "<!ATTLIST..>
" entries.void
update
(MessageReceiver<? super SimpleMessage<XMLDocumentIdentifier>> msg, DTD.Dtd dtd) This method (or its variant) must be called exactly once to initialize maps with a certain dtd.void
update
(MessageReceiver<? super SimpleMessage<XMLDocumentIdentifier>> msg, DTD.Dtd dtd, Set<String> knownElementNames) This method (or its variant) must be called exactly once to initialize maps with a certain dtd.
-
Field Details
-
name2attlist
-
fragmented
-
source
-
-
Constructor Details
-
AttlistIndex
public AttlistIndex()
-
-
Method Details
-
update
This method (or its variant) must be called exactly once to initialize maps with a certain dtd.- Throws:
IllegalStateException
- if called more than once.
-
update
public void update(MessageReceiver<? super SimpleMessage<XMLDocumentIdentifier>> msg, DTD.Dtd dtd, Set<String> knownElementNames) This method (or its variant) must be called exactly once to initialize maps with a certain dtd. Sends to the message channel error messages in case that anDTD.Attlist
is found without correspondingDTD.Element
in knownElementNames.- Throws:
IllegalStateException
- if called more than once.
-
getAttlist
Return the (one and only, unified)DTD.Attlist
object for a given element name ("tag").- Throws:
IllegalStateException
- in caseupdate(MessageReceiver,DTD.Dtd)
has not been called before.
-
isFragmented
Returns whether the attribute with the given name has been declared in more than one (>1) "<!ATTLIST..>
" entries. -
getElementNames
Returns the names of all elements with attributes -
getSource
Returns theDTD.Dtd
which this object reflects.
-