Package schema2template.example.odf
Class OdfHelper
- java.lang.Object
-
- schema2template.example.odf.OdfHelper
-
public class OdfHelper extends Object
Three ODF examples in one: 1) Create an ODF Reference in HTMLl 2) Create Source Code 3) Create simple ODF Python source
-
-
Field Summary
Fields Modifier and Type Field Description static Boolean
DEBUG
static String
mConfigFile
static String
ODF10_RNG_FILE
static int
ODF11_ATTRIBUTE_NUMBER
Expresses the amount of attributes in ODF 1.1.static int
ODF11_ELEMENT_NUMBER
Expresses the amount of elements in ODF 1.1.static String
odf11RngFile
static int
ODF12_ATTRIBUTE_NUMBER
static int
ODF12_ELEMENT_NUMBER
static String
odf12ManifestRngFile
static String
odf12RngFile
static String
odf12SignatureRngFile
static String
TEST_INPUT_ROOT_ODF
static String
TEST_REFERENCE_DIR
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.sun.msv.grammar.Expression
loadSchemaODF10()
Load and parse the ODF 1.0 Schema.static com.sun.msv.grammar.Expression
loadSchemaODF11()
Load and parse the ODF 1.1 Schema.static com.sun.msv.grammar.Expression
loadSchemaODF12()
Load and parse the ODF 1.2 Schema.static void
main(String[] args)
static void
processFileList(org.apache.velocity.app.VelocityEngine ve, com.sun.msv.grammar.Expression root, String outputRuleFile)
-
-
-
Field Detail
-
DEBUG
public static final Boolean DEBUG
-
ODF11_ELEMENT_NUMBER
public static final int ODF11_ELEMENT_NUMBER
Expresses the amount of elements in ODF 1.1. There are some issues in the schema that have to be fixed before the full number can be returned by MSV: Reference table-table-template is never used, therefore several elements are not taking into account:: "table:body" "table:even-columns" "table:even-rows" "table:first-column" "table:first-row" "table:last-column" "table:last-row" "table:odd-columns" "table:odd-rows" "table:table-template" NOTE: Ignoring the '*' there can be 525 elements parsed, but with fixed schema it should be 535.- See Also:
- Constant Field Values
-
ODF12_ELEMENT_NUMBER
public static final int ODF12_ELEMENT_NUMBER
- See Also:
- Constant Field Values
-
ODF11_ATTRIBUTE_NUMBER
public static final int ODF11_ATTRIBUTE_NUMBER
Expresses the amount of attributes in ODF 1.1. There are some issues in the schema that have to be fixed before the full number can be returned by MSV: Following references are never used, therefore its attribute is not taking into account:: draw-glue-points-attlist with "draw:escape-direction" office-process-content with "office:process-content" (DEPRECATED in ODF1.2 only on foreign elements)Following attributes are member of the not referenced element "table:table-template": "text:first-row-end-column" "text:first-row-start-column" "text:last-row-end-column" "text:last-row-start-column" "text:paragraph-style-name"
NOTE: Ignoring the '*' there can be 1162 elements parsed, but with fixed schema it should be 1169.
- See Also:
- Constant Field Values
-
ODF12_ATTRIBUTE_NUMBER
public static final int ODF12_ATTRIBUTE_NUMBER
- See Also:
- Constant Field Values
-
TEST_INPUT_ROOT_ODF
public static final String TEST_INPUT_ROOT_ODF
-
ODF10_RNG_FILE
public static final String ODF10_RNG_FILE
-
odf11RngFile
public static String odf11RngFile
-
odf12RngFile
public static String odf12RngFile
-
odf12SignatureRngFile
public static String odf12SignatureRngFile
-
odf12ManifestRngFile
public static String odf12ManifestRngFile
-
mConfigFile
public static String mConfigFile
-
TEST_REFERENCE_DIR
public static final String TEST_REFERENCE_DIR
-
-
Method Detail
-
processFileList
public static void processFileList(org.apache.velocity.app.VelocityEngine ve, com.sun.msv.grammar.Expression root, String outputRuleFile) throws Exception
- Throws:
Exception
-
loadSchemaODF10
public static com.sun.msv.grammar.Expression loadSchemaODF10() throws Exception
Load and parse the ODF 1.0 Schema.- Returns:
- MSV Expression Tree of ODF 1.0 RelaxNG schema (more specific: The tree's MSV root expression)
- Throws:
Exception
-
loadSchemaODF11
public static com.sun.msv.grammar.Expression loadSchemaODF11() throws Exception
Load and parse the ODF 1.1 Schema.- Returns:
- MSV Expression Tree of ODF 1.1 RelaxNG schema (more specific: The tree's MSV root expression)
- Throws:
Exception
-
-