[jdom-interest] Help:How to make JDOM work with validation on-still
doesn't work !
Tony Zhang
tjzhang at us.ibm.com
Fri Jul 20 14:28:08 PDT 2001
If you add the line in blue in the instance document and If your are using
the default parser (xerces), this should work.
No gurranty there won't be any validating errors, but at least it will find
the schema and start validating.
btw, using a file name, especially one with extension xsd, as a namespace
id is causing a lot of confusion.
If you really don't like to use a uri, make up another string.
========================================================================
Any help, insights will be greatly appreciated.
THANKS!!!!!
-Srini
=======Begin of Conduct.xml========================
<?xml version="1.0" encoding="UTF-8" ?>
<cdm:actions xmlns:cdm="conduct.xsd"
xmlns:xsi="http://www.w3c.org/2000/XMLSchema-instance"
xsi:schemaLocation='conduct.xsd conduct.xsd'>
<cdm:template name="newQuoteTemplate">
<cdm:renderer section="header" type="jsp">documentHead.jsp
</cdm:renderer>
<cdm:renderer section="agencyInfo" type="jsp">agencyInfo.jsp
</cdm:renderer>
<cdm:renderer section="quoteType" type="jsp">quoteType.jsp
</cdm:renderer>
</cdm:template>
</cdm:actions>=======End of Conduct.xml========================
=======Begin of Conduct.xsd========================
<xsd:schema targetNamespace="conduct.xsd"
xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
xmlns:cdm="conduct.xsd" xmlns="conduct.xsd">
<!--do you need the above default namespace?-->
<xsd:complexType name="RendererType">
<xsd:attribute name="section" type="xsd:string"
use="required"/>
<xsd:attribute name="type" type="xsd:string"
use="required"/>
</xsd:complexType>
<xsd:complexType name="TemplateType">
<xsd:sequence>
<xsd:element name="renderer" type="cdm:RendererType"
minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string"
use="required"/>
</xsd:complexType>
<xsd:complexType name="ActionsType">
<xsd:sequence>
<xsd:element name="template" type="cdm:TemplateType"
minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="actions" type="cdm:ActionsType"/>
<xsd:element name="template" type="cdm:TemplateType"/>
</xode>
* <ul>
* <li>First argument: filename of XML document to parse</li>
* <li>Second argument: optional name of SAX Driver class</li>
* </ul>
*/
public static void main(String[] args) }
}=======End of Conduct.java========================
-----Original Message-----
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
More information about the jdom-interest
mailing list