public class HNSToHML
extends java.lang.Object
<sign> element for
any given given HNSSign, using the ANTLR-based
parsing and AST-generation support provided in packages
hamnewlex, hamparse, and hamwalk.| Modifier and Type | Class and Description |
|---|---|
static class |
HNSToHML.HNSToHMLException
Exception class for HNS-to-HML conversion.
|
| Constructor and Description |
|---|
HNSToHML()
Constructs a new converter of HNS signs to HML.
|
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Element |
hmlSign(HNSSign hsign)
Generates and returns the HML
<sign> element
for the given HNSSign. |
java.lang.String |
hmlSignAsDoc(java.lang.String hmlsign)
Wraps the given HML
<sign> element as an HML document
and returns the result. |
java.lang.String |
hmlSignText(org.w3c.dom.Element hmlel)
Returns the given HML element as a multi-line text.
|
java.lang.String |
hmlSignText(HNSSign hsign)
Generates and returns the HML
<sign> element
for the given HNSSign. |
java.lang.String |
rawHMLSignText(org.w3c.dom.Element hmlel)
Returns the given HML element as a raw (typically single-line)
text.
|
void |
validateHML(java.lang.String hdoctxt)
Validates the given HML document text, throwing an
HNSToHML.HNSToHMLException in case of failure;
the presence of whitespace in an element with an EMPTY content
model will be flagged as invalid. |
void |
validateHML(java.lang.String hdoctxt,
boolean emptywsok)
Validates the given HML document text, allowing whitespace
for EMPTY element content, and returning silently if successful or
throwing an
HNSToHML.HNSToHMLException in case of
failure. |
public HNSToHML()
throws HNSToHML.HNSToHMLException
HNSToHML.HNSToHMLExceptionpublic java.lang.String hmlSignAsDoc(java.lang.String hmlsign)
<sign> element as an HML document
and returns the result.public java.lang.String rawHMLSignText(org.w3c.dom.Element hmlel)
throws HNSToHML.HNSToHMLException
HNSToHML.HNSToHMLExceptionpublic java.lang.String hmlSignText(org.w3c.dom.Element hmlel)
throws HNSToHML.HNSToHMLException
HNSToHML.HNSToHMLExceptionpublic java.lang.String hmlSignText(HNSSign hsign) throws HNSToHML.HNSToHMLException
<sign> element
for the given HNSSign.HNSToHML.HNSToHMLExceptionpublic org.w3c.dom.Element hmlSign(HNSSign hsign) throws HNSToHML.HNSToHMLException
<sign> element
for the given HNSSign.HNSToHML.HNSToHMLExceptionpublic void validateHML(java.lang.String hdoctxt,
boolean emptywsok)
throws HNSToHML.HNSToHMLException
HNSToHML.HNSToHMLException in case of
failure.HNSToHML.HNSToHMLExceptionpublic void validateHML(java.lang.String hdoctxt)
throws HNSToHML.HNSToHMLException
HNSToHML.HNSToHMLException in case of failure;
the presence of whitespace in an element with an EMPTY content
model will be flagged as invalid.HNSToHML.HNSToHMLException