com.jaxfront.core.xsdgen
Class DTD2XS

java.lang.Object
  extended by com.jaxfront.core.xsdgen.DTD2XS

public class DTD2XS
extends java.lang.Object

DTD => REC-xmlschema-1-20010502

Version:
1.00, 06/12/01
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 dtdURI, java.io.InputStream xsltStream, boolean resolveEntities, boolean ignoreComments, int commentLength, java.lang.String commentLanguage, java.lang.String conceptRelation, int conceptHighlight, int conceptOccurrence)
          Translate DTD to REC-xmlschema-1-20010502.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTD2XS

public DTD2XS(java.lang.Object log)
Create a DTD to REC-xmlschema-1-20010502 translator.

Parameters:
log - Where to put logging information.
Method Detail

translate

public java.lang.String translate(java.lang.String dtdURI,
                                  java.io.InputStream xsltStream,
                                  boolean resolveEntities,
                                  boolean ignoreComments,
                                  int commentLength,
                                  java.lang.String commentLanguage,
                                  java.lang.String conceptRelation,
                                  int conceptHighlight,
                                  int conceptOccurrence)
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"/>.

commentLength - Ignore DTD comments with length greater than commentLength.

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