Class dtd2xs
java.lang.Object
|
+--dtd2xs
- public class dtd2xs
- extends java.lang.Object
DTD => REC-xmlschema-1-20010502
- Author:
- Ralf Schweiger
Constructor Summary |
dtd2xs(java.lang.Object log)
Create a DTD to REC-xmlschema-1-20010502 translator. |
Method Summary |
java.lang.String |
translate(java.lang.String dtdURL,
boolean resolveEntities,
boolean preserveComments,
java.lang.String commentLanguage,
int maxLengthComment,
boolean conceptRelation,
java.lang.String schemaConcepts,
int minRelation)
Translate DTD to REC-xmlschema-1-20010502. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
dtd2xs
public dtd2xs(java.lang.Object log)
- Create a DTD to REC-xmlschema-1-20010502 translator.
- Parameters:
log
- Where to put logging information.
translate
public java.lang.String translate(java.lang.String dtdURL,
boolean resolveEntities,
boolean preserveComments,
java.lang.String commentLanguage,
int maxLengthComment,
boolean conceptRelation,
java.lang.String schemaConcepts,
int minRelation)
- Translate DTD to REC-xmlschema-1-20010502.
- Parameters:
dtdURL
- Location of the DTD resource.resolveEntities
- Resolve DTD entities. Unused DTD entities are ignored. Map meaningful DTD entities onto named, i.e. reusable XML Schema concepts such as group, attributeGroup and simpleType.preserveComments
- Preserve DTD comments. Map DTD comments onto XML Schema documentation. Locates DTD comments at /schema/annotation[1]/documentation[i] referred to by
<documentation source="#xpointer(/schema/annotation[1]/documentation[i]/text())"/>.commentLanguage
- Examples: "en", "de" ... Result: <documentation xml:lang="en"/>.maxLengthComment
- Ignore DTD comments with length greater than maxLengthComment
.conceptRelation
- Relate DTD comments to model concepts. Ignore comments without concept relation.schemaConcepts
- Example: "element enumeration" relates DTD comments to the model concepts value-of(element/@name), value-of(enumeration/@value).minRelation
- Minimum relation between DTD comment and model concept. Heuristics
{ relation = 0; for (concept occurs in comment) relation += highlight(concept); return relation >= minRelation; }- Returns:
- XML Schema