Package eu.bandm.tools.dtd
Class Utilities
java.lang.Object
eu.bandm.tools.dtd.Utilities
Small helper functions and data.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Add a process instruction to tdom, containing the document id of the Dtd.static final String
canonicalKey
(DTD.Attlist attribute) Makes the string used as key into maps/sets which unify different kinds of markup declaration.static final String
canonicalKey
(DTD.Element element) Makes the string used as key into maps/sets which unify different kinds of markup declaration.static final String
canonicalKey
(DTD.Entity entity) Makes the string used as key into maps/sets which unify different kinds of markup declaration.static final String
canonicalKey_att_name_type
(DTD.AttDef attDef) Makes the string used as key into maps/sets which unify different kinds of markup declaration.static final String
canonicalKey_attribute
(String name) Makes the string used as key into maps/sets which unify different kinds of markup declaration.static final String
canonicalKey_element
(String name) Makes the string used as key into maps/sets which unify different kinds of markup declaration.static final String
canonicalKey_entity
(String name, boolean attribute) Makes the string used as key into maps/sets which unify different kinds of markup declaration.static final URL
Makes a URL from a constant which is KNOWN to be syntactically correct.static String
Extracts the underlined part, which is used BY US as a file identifier:getAllPiAsString
(String target, DTD.Dtd dtd) Collect the text values of all PIs with a given target.static final String
make_formal_public_identifier
(String owner, String fip_class, String description, String language, @Opt String version) Makes something likestatic final String
make_formal_public_identifier_bandm
(String fip_class, String description, String language) static final String
make_formal_public_identifier_bandm
(String fip_class, String description, String language, String version) protected static void
notEmptyCheck
(@Opt String o, String t) protected void
static String
-
Field Details
-
PUBLIC_IDENTIFIER_OWNER_BANDM
- See Also:
-
fpi_mainlevel_separator
- See Also:
-
PUBLIC_IDENTIFIER_PREFIX_BANDM
Since we are a domain owner, we automatically have a *registered* "Formal Public Identifier". (So we have more than w3c !-)- See Also:
-
attribute_canonicalKey_type_separator
- See Also:
-
prefix_local_anchor
- See Also:
-
PI_TARGET_TDOM
- See Also:
-
-
Method Details
-
constUrl
Makes a URL from a constant which is KNOWN to be syntactically correct. -
nullcheck
-
notEmptyCheck
-
make_formal_public_identifier
public static final String make_formal_public_identifier(String owner, String fip_class, String description, String language, @Opt @Opt String version) Makes something like+//IDN bandm.eu//DTD a.b.c.d//en or +//IDN bandm.eu//DTD a.b.c.d//en//1.0
The "charset" format is not supported. The owner and fip_class syntax are not checked. Documentation on FPIs is in the user documentation. and in http://en.wikipedia.org/wiki/Formal_Public_Identifier and in http://xml.coverpages.org/tauber-fpi.html -
make_formal_public_identifier_bandm
-
make_formal_public_identifier_bandm
-
fpi_extractDescription
Extracts the underlined part, which is used BY US as a file identifier:+//IDN bandm.eu//DTD a/b/c.dtd //en//1.0 ^^^^^^^^^
Returns null in case of error, which includes the epsilon string. -
canonicalKey_element
Makes the string used as key into maps/sets which unify different kinds of markup declaration. -
canonicalKey
Makes the string used as key into maps/sets which unify different kinds of markup declaration. -
canonicalKey_attribute
Makes the string used as key into maps/sets which unify different kinds of markup declaration. -
canonicalKey
Makes the string used as key into maps/sets which unify different kinds of markup declaration. -
canonicalKey_entity
Makes the string used as key into maps/sets which unify different kinds of markup declaration. -
canonicalKey
Makes the string used as key into maps/sets which unify different kinds of markup declaration. -
canonicalKey_att_name_type
Makes the string used as key into maps/sets which unify different kinds of markup declaration. -
getAllPiAsString
Collect the text values of all PIs with a given target. The equality test of the target ignores cases by the java methodString.equalsIgnoreCase(String)
-
addTdomPI_documentId
Add a process instruction to tdom, containing the document id of the Dtd.
The pi "<?tdom PUBLIC ...?>
" allows a dtd to declare its own public and system id. This information will be used by tdom e.g. to insert the dtd-based text type declaration into the printings of model instances. This method inserts such a PI (at position zero of the markup), iff there is an documentId!=null set in the dtd, and no such PI already exists. (So the method is idempotent)
To our understanding, the SYSTEM part of the id should NEVER be used, because it is redundant and reflects only the "role as a cache" of the local file system. But this is not possible, since the grammar requires it, cf.XMLDocumentIdentifier.toString()
.- Returns:
- whether an update on the dtd data is done.
-
quoteAttributeValue
-