Andy Clark wrote: > For example, the following config file would construct a > configuration with just a scanner -- no namespace binder or > validation: > > <config> > <property id='doc-scanner' > class='org.apache.xerces.impl.XMLDocumentScannerImpl'/> > <property id='dtd-scanner' > class='org.apache.xerces.impl.XMLDTDScannerImpl'/>
Sheesh! I'm not following my own XNI documentation! Of course the properties that these classes depend on are required as well. PLUS... I should add a propertyId to the <property> element so that the dynamic configuration would know the property id to use for the setting. So I will make some more modifications to the proposed DTD. <!ELEMENT config (property*,pipeline?)> <!ELEMENT property EMPTY> <!ATTLIST property id ID #IMPLIED> <!ATTLIST property propertyId CDATA #IMPLIED> <!ATTLIST property class NMTOKEN #REQUIRED> <!ELEMENT pipeline ((doc,dtd?)|(doc?,dtd))> <!ELEMENT doc (scanner,filter*)> <!ELEMENT dtd (scanner,filter*)> <!ELEMENT scanner EMPTY> <!ATTLIST scanner idref IDREF #REQUIRED> <!ELEMENT filter EMPTY> <!ATTLIST filter idref IDREF #REQUIRED> And the sample would be rewritten as: <!DOCTYPE config SYSTEM 'config.dtd' [ <!ENTITY apache 'http://apache.org/xml/properties/internal'> <!ENTITY xerces 'org.apache.xerces'> ]> <config> <property propertyId='&apache;/symbol-table' class='&xerces;.util.SymbolTable'/> <property propertyId='&apache;/error-reporter' class='&xerces;.impl.XMLErrorReporter'/> <property id='doc-scanner' propertyId='&apache;/document-scanner' class='&xerces;.impl.XMLDocumentScannerImpl'/> <property id='dtd-scanner' propertyId='&apache;/dtd-scanner' class='&xerces;.impl.XMLDTDScannerImpl'/> <pipeline> <doc> <scanner idref='doc-scanner'/> </doc> <dtd> <scanner idref='dtd-scanner'/> </dtd> </pipeline> </config> -- Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
