Package eu.bandm.tools.xslt.base
Class AttributeChecks_valueTemplates
java.lang.Object
eu.bandm.tools.dtm.AttributeChecks
eu.bandm.tools.xslt.base.AttributeChecks_valueTemplates
This is a refinement necessary for xslt of
AttributeChecks
.
Since "attribute value templates" are allowed in xslt code,
ill-defined attribute values (in XML sense) must further be analysed,
and possibly be removed from error sets.
The algorithm steps through the sets of all classified attributes.
and moves them from there to the set "computing" iff their values contain template
xpath code.
Since the base class AttributeChecks
is initialized from SAX ,
all attribute names are unique. ((FIXME stimmt das ???))-
Field Summary
Modifier and TypeFieldDescriptionprotected Set<NamespaceName>
protected final TPathCache
protected Map<NamespaceName,
TPathCache.ExprClassified> All attributes which must be computed; represented as parsed and classified TPath expressions.protected final MessageReceiver<SimpleMessage<XMLDocumentIdentifier>>
protected Set<NamespaceName>
protected Set<NamespaceName>
Fields inherited from class eu.bandm.tools.dtm.AttributeChecks
atts, elDef, loc, missing, nsn2index, ok, undeclared, violateFixed, violateType
-
Constructor Summary
ConstructorDescriptionAttributeChecks_valueTemplates
(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, TPathCache cache, Attributes atts, DTM.Element elDef, Location<XMLDocumentIdentifier> loc, Set<NamespaceName> additionalXslt) -
Method Summary
Modifier and TypeMethodDescriptionboolean
check()
Call super.check() and look for "Attribute Value Templates" like "xx{yy}zz" afterwards.boolean
protected void
retest
(Set<NamespaceName> set) Methods inherited from class eu.bandm.tools.dtm.AttributeChecks
attValueByNamespaceName, check, check_more_tokens, check_one_token, dump, dump1, get_index, get_loc, get_missing, get_ok, get_undeclared, get_violateFixed, get_violateType, noConstructionProhibitingErrors, noErrors, sendErrorMessages_Undecl_Type_Fixed
-
Field Details
-
computing
All attributes which must be computed; represented as parsed and classified TPath expressions. -
additionalXslt
-
xsltFound
-
nonTemplates
-
cache
-
msg
-
-
Constructor Details
-
AttributeChecks_valueTemplates
public AttributeChecks_valueTemplates(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, TPathCache cache, Attributes atts, DTM.Element elDef, Location<XMLDocumentIdentifier> loc, Set<NamespaceName> additionalXslt)
-
-
Method Details
-
getXsltFound
-
correctAndConstant
public boolean correctAndConstant() -
check
public boolean check()Call super.check() and look for "Attribute Value Templates" like "xx{yy}zz" afterwards. Use a globalTPathCache
for parsing. Shift those attributes from their original set tocomputing
. +
In many cases there is no fine-granualr location information, so treat it opaquely. +
+
(FIXME more static checks are possible:- eg. singular (NMTOKEN) forbids blanks in constant parts
- NMTOKEN(S) NAME(S) can be checked for valid characters
- MORE !?!?
- Overrides:
check
in classAttributeChecks
-
retest
-