public class Tasks extends Object
Main
):
textfile ---> udom ----------------> sax ----> xml textfile (1) \ -> tdom (2) textfile ---> udom --sax--[xslt]---> sax --> textfile (xml/no-xml) (3) ^ \ | -> tdom (4) \________________________________ \ -->Txsl Code (=own implementation, / ( formerly: JAXP translet modulereg ---> xslt-d2d-source / xslt-d2d-source--------> udom --> sax --> xml xslt source (5) \ (text2xml parser) \ ( in xslt mode ) \----------------------------------> d2d xslt source (5) (MODULE.{ddf,umod,dtd, etc.} \ V modulereg ------------------------------------------> MODULE.dtd (6) \ \ -------------------------------------------> FILENAME.ddf (7) \ \ -------------------> d2d_documentation_[MODULE]_user_[LANG] (8) \ \ ---------------------------------------> FILENAME.html (9) \ \ -------------------------------------> FILENAME.xml (10) MODULE.dtd --------------------------------------------> MODULE.ddf (11)Legend:
#text2texts(MessageReceiver, ModuleRegistry, Text2Udom.ErrorStrategy, File, ContentHandler, Map, String, NamespaceName2String)
(File, ModuleRegistry, Class, TypedDTD, MessageReceiver, Text2Udom.ErrorStrategy, int)
#text2texts(MessageReceiver, ModuleRegistry, Text2Udom.ErrorStrategy, File, ContentHandler, Map, String, NamespaceName2String)
udom2xslt2document(MessageReceiver,ModuleRegistry,Udom,String,String,Class,TypedDTD,URIResolver,NamespaceName2String,boolean)
.
Main#ddf2xslt(String)
.
Def2Dtd#convert(MessageReceiver, ModuleRegistry, XMLDocumentIdentifier, boolean)
.
Def2Doc
.
../../d2d/base/Def2HtmlForm
.)
Dtd2Def
, which is also called by Modulereg,
when a dtd is used as ddf.
But the use case is slightly different from (7), since more errors must be
signalled explicitly and more diagnosis is required.
Constructor and Description |
---|
Tasks() |
Modifier and Type | Method and Description |
---|---|
static void |
ddf2doc3(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
ModuleRegistry moduleReg,
String modulename,
String language,
String outputname,
String gencomment,
NamespaceName2String stylesheetParams,
Iterable<String> additionalSources,
int lineWidth)
Generate the html doc for a given module, ie.
|
static void |
ddf2dtd(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
ModuleRegistry moduleReg,
String modulename,
String docuLanguage,
String fileOutputName,
int lineWidth)
Convert a module to a dtd.
|
static void |
ddf2xslt(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
ModuleRegistry moduleReg,
String modulename,
String targetModule,
@Opt String targetTopTag,
String outputname,
Text2Udom.ErrorStrategy errorStrategy,
String genString,
int lineWidth)
Extracts all xslt rules for the given module and target
into a d2d definition and exports this to a d2d source file.
|
static void |
dtd2ddf(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> extmsg,
ModuleRegistry moduleReg,
String inputname,
String fileOutputName,
int lineWidth)
Convert a dtd to a module.
|
protected static void |
e_error(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
Exception ex,
String s,
Object... args)
Adapter to treat parse formatting of Strings to MuLiMessageReceiver,
and simulate it locally for normal MessageReceiver.
(This must be treated differently, because MuLiMessageReceiver FIRST translates BEFORE formatting !-) |
protected static void |
e_error(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
String s) |
protected static void |
e_log(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
String s) |
protected static void |
e_log(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
String s,
Object... args) |
protected static void |
e_logEnd(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
String s) |
protected static void |
e_logStart(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg,
String s) |
protected static void |
execXsltUsingXalan(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> e_msg,
MessageReceiver<SimpleMessage<Object>> msgNOLOC,
ResultingStructure res,
Templates templates,
NamespaceName2String e_stylesheetParams,
boolean errorsInSourceFound,
@Opt String stylesheetErrorFlag,
File resfile,
@Opt Map<String,String> inputNamespaces) |
static <T extends TypedDocument,D extends TypedDTD> |
string2tdom(String sourcetext,
ModuleRegistry modreg,
Class<T> documentClass,
D dtdInstance,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr,
Text2Udom.ErrorStrategy errorStrategy,
int debug)
Convert a d2d source text (GIVEN AS STRING) into a tdom model.
|
static <T extends TypedDocument,D extends TypedDTD> |
text2tdom(File infile,
ModuleRegistry modreg,
Class<T> documentClass,
D dtdInstance,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr,
Text2Udom.ErrorStrategy errorStrategy,
int debug)
Convert a d2d input file into a tdom model.
|
static void |
text2texts(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> e_msg,
ModuleRegistry e_moduleReg,
Text2Udom.ErrorStrategy errorStrategy,
File e_sourcefile,
@Opt String generationComment,
@Opt ContentHandler contentHandler,
Map<String,File> e_formats,
String stylesheetErrorFlag,
NamespaceName2String e_stylesheetParams)
Convert directly a d2d encoded input text file
into output files in different output formats, using xslt.
|
static <T extends TypedDocument,D extends TypedDTD> |
udom2xslt2document(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr,
ModuleRegistry modreg,
Udom input,
String xsltTargetModuleSelect,
String xsltTargetToptagSelect,
Class<T> documentClass,
D dtdInstance,
URIResolver uriResolver,
NamespaceName2String stylesheetparams,
boolean debug)
Convert a d2d untyped model (result of a d2d parsing process)
via the xslt rules coming with the d2d module definition directly into a tdom model.
|
protected static void e_log(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, String s)
protected static void e_log(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, String s, Object... args)
protected static void e_logStart(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, String s)
protected static void e_logEnd(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, String s)
protected static void e_error(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, String s)
protected static void e_error(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, Exception ex, String s, Object... args)
public static void ddf2dtd(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, ModuleRegistry moduleReg, String modulename, String docuLanguage, String fileOutputName, int lineWidth)
public static void dtd2ddf(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> extmsg, ModuleRegistry moduleReg, String inputname, String fileOutputName, int lineWidth)
public static void ddf2xslt(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, ModuleRegistry moduleReg, String modulename, String targetModule, @Opt @Opt String targetTopTag, String outputname, Text2Udom.ErrorStrategy errorStrategy, String genString, int lineWidth)
#filename_template_xslt_d2d
and ,
#filename_template_xslt_xml
, like
#d2d 2.0 xslt text producing [MODULE:ELEMENT] from [PREF] = [NS_URI] from [PREF] = [NS_URI]Collects into the header all namespaces which appear in the tags of the source module (or module*S*, incl d2d-meta, etc).
template match="a:b"
the prefix "a:" must be declared somewhere!
Text2Udom.getXsltInputNamespaces()
.targetTopTag
- is only needed for to find the reachable elements, for the xslt
parsing. It may be ==null, indicating pure text.public static void ddf2doc3(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, ModuleRegistry moduleReg, String modulename, String language, String outputname, String gencomment, NamespaceName2String stylesheetParams, Iterable<String> additionalSources, int lineWidth)
additionalSources
- source files which only add further documentation text
to definitions contained in a loaded module.outputname
- the path of the directory in which to create the generated documentation
directory.public static void text2texts(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> e_msg, ModuleRegistry e_moduleReg, Text2Udom.ErrorStrategy errorStrategy, File e_sourcefile, @Opt @Opt String generationComment, @Opt @Opt ContentHandler contentHandler, Map<String,File> e_formats, String stylesheetErrorFlag, NamespaceName2String e_stylesheetParams)
Udom
.
Main.main(String[])
.protected static void execXsltUsingXalan(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> e_msg, MessageReceiver<SimpleMessage<Object>> msgNOLOC, ResultingStructure res, Templates templates, NamespaceName2String e_stylesheetParams, boolean errorsInSourceFound, @Opt @Opt String stylesheetErrorFlag, File resfile, @Opt @Opt Map<String,String> inputNamespaces)
@Opt public static <T extends TypedDocument,D extends TypedDTD> T udom2xslt2document(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr, ModuleRegistry modreg, Udom input, String xsltTargetModuleSelect, String xsltTargetToptagSelect, Class<T> documentClass, D dtdInstance, URIResolver uriResolver, NamespaceName2String stylesheetparams, boolean debug)
@Opt public static <T extends TypedDocument,D extends TypedDTD> T text2tdom(File infile, ModuleRegistry modreg, Class<T> documentClass, D dtdInstance, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr, Text2Udom.ErrorStrategy errorStrategy, int debug)
Meta2Pi
is inserted, to store d2d error messages transparently
in a tdom model.public static <T extends TypedDocument,D extends TypedDTD> T string2tdom(String sourcetext, ModuleRegistry modreg, Class<T> documentClass, D dtdInstance, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr, Text2Udom.ErrorStrategy errorStrategy, int debug)
see also the complete user documentation .