Class NmTokensAttribute

    • Method Detail

      • checkValue

        protected void checkValue​(@Opt
                                  @Opt java.util.List<java.lang.String> values)
                           throws TdomAttributeSyntaxException
        Description copied from class: TypedAttribute
        Check routine for the validity of the attributes' intended value. Is a call-back, implemented by the sub-classes. Is called only here, by two constructors and the #set_value(V) method. The value null means "absent" for #IMPLIED attributes and passes the test.
        Specified by:
        checkValue in class TypedAttribute<java.util.List<java.lang.String>>
        values - the value to test; maybe null.
        TdomAttributeSyntaxException - iff the value does not match the type of the XML attribute, including a forbidden Null.
      • getTypeString

        public java.lang.String getTypeString()
        Description copied from class: TypedAttribute
        The definition text for the "type" of the attribute in the original DTD.
        Specified by:
        getTypeString in class TypedAttribute<java.util.List<java.lang.String>>
      • mustBeNameToken

        protected boolean mustBeNameToken()
        Overridden by subclass.
      • splitValues

        public static @Opt java.util.List<java.lang.String> splitValues​(@Opt
                                                                        @Opt java.lang.String text)
        Used from extern as auxiliary method. The definiton [XML 1.0], production rule [8] requires EXACTLY ONE SPACE between tokens, and tokens must be at least one character long.

        FIXME the current impl gives strange diagnosis for more blanks, as in att="b⎵⎵⎵c".

      • findSplit

        protected static java.util.List<java.lang.String> findSplit​(org.xml.sax.Attributes attrs,
                                                                    NamespaceName name)
      • getStringValue

        public final @Opt java.lang.String getStringValue​(@Opt
                                                          @Opt java.util.List<java.lang.String> v)
        Description copied from class: TypedAttribute
        Returns the textual representation of a possible attribute value (not null), as it would be contained literally in a possible XML text representation. Since the textual representation of a String is the string itself, this method is relevant for enumeration types only (Later: also for "entity" types, but these are not yet supported.)
        Specified by:
        getStringValue in class TypedAttribute<java.util.List<java.lang.String>>
        (never null) the textual representation of this attribute value, as it would be contained literally in a possible XML text representation.