[all pages:] introduction message / location / muli format dtd xantlr tdom ops paisley metajava umod option auxiliaries d2d downloads & licenses people bibliography APPENDICES:: white papers white papers 2 white papers 3 project struct proposal cygwin tips SOURCE:option.dtd SOURCE:dtd.umod DOC:deliverables.ddf DOC-DE:deliverables.ddf DOC:mtdocpage.ddf DOC-DE:mtdocpage.ddf SOURCE:basic.dd2 SOURCE:xslt.dd2
SOURCE:option.dtd | bandm meta_tools | DOC:deliverables.ddf |
APPENDIX: The umod Model Definiton File for the Structure of our DTD (Document Type Definition) Model
The following text shows the model definition following the umod syntaxof our implementation of the "document type definition" object, as explained in dtd:
MODEL DTD = DOC Model for w3c xml dtds, written in umod, cf. the <a href='{@docRoot}/../usage/dtd.html'>user documentation</a>. $$ EXT simpleMessage = eu.bandm.tools.message.SimpleMessage EXT meassageReceiver = eu.bandm.tools.message.MessageReceiver EXT xmlDocumentIdentifier = eu.bandm.tools.message.XMLDocumentIdentifier EXT location = eu.bandm.tools.message.Location <eu.bandm.tools.message.XMLDocumentIdentifier> VISITOR 0 Visitor MULTIPHASE ; VISITOR 0 SinglePathVisitor ; VISITOR 0 Dump IS PRINTER ; VISITOR 0 CoRewriter IS COREWRITER ; VISITOR 0 Rewriter IS REWRITER ; TOPLEVEL CLASS Dtd locations SEQ OPT location documentId OPT xmlDocumentIdentifier ! C 1/0 ; textDecl OPT TextDecl ! V 0/0 ; markup SEQ MarkupDecl ! V 0/1 ; entityUsage string <-> string FORMAT "'<!-- XML 1.1 DTD '|(documentId?);' -->'" "/(textDecl?)/markup[/]" <<JAVA public static Dtd parse(java.io.Reader in, eu.bandm.tools.message.XMLDocumentIdentifier id, java.io.File base, boolean lateError, eu.bandm.tools.message.MessageReceiver <? super eu.bandm.tools.message.SimpleMessage <XMLDocumentIdentifier>> msg){ final Dtd result = TunedDTDParser.parse(in, id, base, lateError, msg); return result ; } $$ TOPLEVEL CLASS MarkupDecl | Attlist | Comment | Element | Entity | Notation | PI | TextDecl EntityValue EntityContext AttDef AttType | AttTypeConstant | AttTypeAbbrev | Enumerated //| NotationAtt FIXME MISSING DefaultDecl | DefaultDeclConstant | AttValue ContentModel | ContentModelConstant | Mixed | CP ABSTRACT | | Singleton | | Seq | | Choice | | Abbrev NmToken EXTEND CLASS MarkupDecl location OPT location ! C 99/0 ; locations SEQ OPT location | Attlist element string ! C 0/0 99/1 ; FORMAT "'<!ATTLIST 'element/atts[/]'>'" atts SEQ AttDef ! V 0/0 ; | Comment text string ! C 0/0 99/1 ; FORMAT "'<!--'$text text'-->'" | Element name string ! C 0/0 99/1 ; content ContentModel ! C 0/1 99/2 V 0/0 ; FORMAT "('<!ELEMENT' name )|16>(" "(($is Abbrev content)'('content')'" "?($is Singleton content)'('content')'" "?content))|' >'" | Entity parameter bool ! C 0/0 99/1; name string ! C 0/1 99/2; value EntityValue ! C 0/2 99/3 V 0/0 ; FORMAT "('<!ENTITY'|' '|$switch parameter{true:'%'} 2>name); ;2>value;'>'" | Notation name string ! C 0/0 99/1 ; id xmlDocumentIdentifier ! C 0/1 99/2 ; FORMAT "'<!NOTATION' name 2>id" | PI target string ! C 0/0 99/1 ; text string ! C 0/1 99/2 ; FORMAT "('<?'target; ;2>($text text)'?>')?('<?'target'?>')" | TextDecl version string ! C 0/0 99/1 ; encoding OPT string ! C 0/1 99/2 ; FORMAT "'<?xml'; ;2>(('version'| |'='| |'\"'version'\"'); ;" "('encoding'| |'='| |'\"'encoding'\"')?);'?>'" EntityValue id OPT xmlDocumentIdentifier ! C 0/0 ; definition string ! C 0/1 1/0 2/0 ; replacement OPT string ! C 0/2 1/1 ; FORMAT "id?$java 'eu.bandm.tools.format.Format.quoteDTDstyle'($text definition)" AttDef location OPT location ! C 99/0 ; locations SEQ OPT location name string ! C 0/0 99/1 ; type AttType ! C 0/1 99/2 V 0/0 ; value DefaultDecl ! C 0/2 99/3 V 0/1 ; FORMAT "$tabular{10>name,30>type,50>value}" AttType ABSTRACT ALGEBRAIC JAVA public static final AttType CDATA = new AttTypeConstant("CDATA") ; $$ JAVA public static final AttType ID = new AttTypeConstant("ID") ; $$ JAVA public static final AttType IDREF = new AttTypeConstant("IDREF") ; $$ JAVA public static final AttType IDREFS = new AttTypeConstant("IDREFS") ; $$ JAVA public static final AttType ENTITY = new AttTypeConstant("ENTITY") ; $$ JAVA public static final AttType ENTITIES = new AttTypeConstant("ENTITIES") ; $$ JAVA public static final AttType NMTOKEN = new AttTypeConstant("NMTOKEN") ; $$ JAVA public static final AttType NMTOKENS = new AttTypeConstant("NMTOKENS") ; $$ | AttTypeConstant label string ! C 0/0 ; FORMAT "label" | AttTypeAbbrev label string ! C 0/0 ; FORMAT "'&'label';'" | Enumerated tokens SEQ string ! C 0/0 ; FORMAT "tokens['('|' | ';')']" //| NotationAtt // names SEQ string DefaultDecl JAVA public static final DefaultDecl REQUIRED = new DefaultDeclConstant("REQUIRED") ; public static final DefaultDecl IMPLIED = new DefaultDeclConstant("IMPLIED") ; $$ | DefaultDeclConstant label string ! C 0/0 ; FORMAT "'#'label" | AttValue fixed bool ! C 0/0 ; value string ! C 0/1 ; FORMAT // ALT PRE 20170428; // "$switch fixed{true:'#FIXED '}$java'eu.bandm.tools.format.Format.quoteDTDstyle'(value)" // ATTENTION neu 20170428: "escapeToJava" is now under "append", not under "block" "$switch fixed{true:'#FIXED '}($java'eu.bandm.tools.format.Format.quoteDTDstyle'(value))" ContentModel ALGEBRAIC JAVA public static final ContentModel EMPTY = new Empty("EMPTY") ; $$ JAVA public static final ContentModel ANY = new Any("ANY") ; $$ | ContentModelConstant label string ! C 0/0 ; FORMAT "label" | | Empty FORMAT "'EMPTY'" // FIXME CHECK | | Any FORMAT "'ANY'" // FIXME CHECK | Mixed names SEQ string ! C 0/0 ; FORMAT "names['(#PCDATA | '|' | ',' )*'/'(#PCDATA)']" | CP // ABSTRACT modifier int = "NONE" ! C 0/0 ; // DEFAULT JAVA NONE $$ JAVA public static final int NONE = 0 ; $$ JAVA public static final int OPTIONAL = 1 ; $$ JAVA public static final int STAR = 2 ; $$ JAVA public static final int PLUS = 3 ; $$ JAVA public static int combine(int modifier1, int modifier2) { if(modifier1 == NONE) return modifier2 ; if(modifier2 == NONE) return modifier1 ; if(modifier1 == modifier2) return modifier1 ; return STAR ; } $$ JAVA public CP modify(int modifier) { throw new AbstractMethodError() ; } $$ | | Singleton name string ! C 0/1 1/0 ; TOSTRING JAVA return "s~"+name ; $$ FORMAT "name$switch modifier{1:'?',2:'*',3:'+'}" // TEST IT FIXME JAVA public CP modify(int modifier) { return new Singleton(combine(this.modifier, modifier), name) ; } $$ | | Seq elems SEQ CP ! C 0/1 1/0 V 0/0 ; JAVA public CP modify(int modifier) { return new Seq(combine(this.modifier, modifier), elems) ; } $$ FORMAT "elems['('|', ',')']$switch modifier{1:'?',2:'*',3:'+'}" | | Choice alts SEQ CP ! C 0/1 1/0 V 0/0 ; JAVA public CP modify(int modifier) { return new Choice(combine(this.modifier, modifier), alts) ; } $$ FORMAT "alts['('|' | ',')']$switch modifier{1:'?',2:'*',3:'+'}" | | Abbrev name string ! C 0/1 1/0 ; body CP ! C 0/2 1/1 V 0/0 ; FORMAT "('(%'name';)'$switch $mode{1:'[[='body']]'}" "$switch modifier{0:$throw,1:'?',2:'*',3:'+'})" "?('%'name';'$switch $mode{1:'[[='body']]'})" JAVA public CP modify(int modifier) { return new Abbrev(combine(this.modifier, modifier), name, body.modify(modifier)) ; } $$ NmToken // FIXME REQUIRED !?!? text string ! C 0/0 ; FORMAT "text" END MODEL //eof |
[all pages:] introduction message / location / muli format dtd xantlr tdom ops paisley metajava umod option auxiliaries d2d downloads & licenses people bibliography APPENDICES:: white papers white papers 2 white papers 3 project struct proposal cygwin tips SOURCE:option.dtd SOURCE:dtd.umod DOC:deliverables.ddf DOC-DE:deliverables.ddf DOC:mtdocpage.ddf DOC-DE:mtdocpage.ddf SOURCE:basic.dd2 SOURCE:xslt.dd2
SOURCE:option.dtd | bandm meta_tools | DOC:deliverables.ddf |
made
2018-12-30_11h03 by
lepper on
linux-q699.site
produced with
eu.bandm.metatools.d2d
and
XSLT
FYI view
page d2d source text