Very recently I have started working with XML. I wrote sdat.xml, sdat.dcd and sdat.xsl files. DCD file has been linked in the XML file in DOCTYPE declaraton to validate the XML file. Of course, XSL has also been referred in xml file. I am trying to parse the xml file using xalan parser (of Apache group)as shown below.
c:\xml>
java org.apache.xalan.xslt.Process -IN sdat.xml -XSL sdat.xsl -OUT sdat.htm
The output generated is directed to the file called sdat.htm.
The error which I got here is,
XSLT Error (javax.xml.transform.TransformerException): The markup declarations contained or pointed to by the document type declaration must be well-formed.
I am cent percent confidant that my sdat.dcd file is well-formed. Here I am giving the sample code of .dcd and .xml files.
sdat.xml
----------
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v3.5 NT (
http://www.xmlspy.com) by venkat (deque systems) -->
<?xml-stylesheet type="text/xsl" href="sdat.xsl" ?>
<!DOCTYPE SDAT SYSTEM "sdat.dcd">
<SDAT>
<OwnerInformation>
<OwnerName>FRENCH, EDMOND B & B J</OwnerName>
<Use> RESIDENTIAL</Use>
<MailingAddress>
<MAddress>12241 CHERRY HILL RD</MAddress>
<MCity>SILVER SPRING </MCity>
<MState> MD </MState>
<MZip>20904</MZip>
</MailingAddress>
</OwnerInformation>
</SDAT>
sdat.dcd
---------
<?xml version="1.0" encoding="UTF-8"?>
<DCD>
<ElementDef Type="SDAT" Model="Elements" Content="Closed" Root="True">
<Description> It is the root of the document</Description>
<Group RDF:Order="Seq">
<Element>OwnerInformation</Element>
</Group>
</ElementDef>
<ElementDef Type="OwnerInformation" Model="Elements" Content="Closed">
<Group RDF:Order="Seq">
<Element>OwnerName</Element>
<Element>Use</Element>
<Element>MailingAddress</Element>
</Group>
</ElementDef>
<ElementDef Type="OwnerName" Model="Data" Datatype="string"/>
<ElementDef Type="Use" Model="Data" Datatype="string"/>
<ElementDef Type="MailingAddress" Model="Elements"
Content="Closed">
<Group RDF:Order="Seq">
<Element>MAddress</Element>
<Element>MCity</Element>
<Element>MState</Element>
<Element>MZip</Element>
</Group>
</ElementDef>
<ElementDef Type="MAddress" Model="Data" Datatype="string"/>
<ElementDef Type="MCity" Model="Data" Datatype="string"/>
<ElementDef Type="MState" Model="Data" Datatype="string"/>
<ElementDef Type="MZip" Model="Data" Datatype="string"/>
</DCD>
I appreciate if anybody can help me to fix the problem which I have explained above. If the problem lies in the xalan parser, please suggest me a parser that can understand .dcd to parse the xml file. Looking forward for your help...
rgds,
venkat
[This message has been edited by venkat paruchuri (edited August 15, 2001).]