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>
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).]
First, I would like to thank for your response. <Group> is predefiend node in DCD vocabulary that does not have namespace attribute. Moreover, IE will not understand DCD declarations. Please help me if you have figured out the parser that validates DCD declarations. rgds, venkat
[This message has been edited by venkat paruchuri (edited August 16, 2001).]
Isn't DCD is old( read:ancient! ). I know for sure it has been classified as a "Predecessor" technology. May I ask why are you not using Schema? Checkout XMLSpy. They claim that they support DCDs. For the benefit of others who may be wondering what DCD is - Originally spec'ed out by Microsoft and IBM, DCDs provide similar functionality to Document Type Definitions (DTDs), which the XML world initially inherited from SGML, or Standard Generalized Markup Language. But DCDs extend further by supporting other XML-friendly standards such as Resource Description Framework (RDF), XML-Data and XML Namespaces. HTH
------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Hi ajit, DCD has been submitted to W3C in july,1998. Informaton regarding DCD can be found at http://www.w3.org/TR/NOTE-dcd. I am using DCD as it has been my requirement. I have been trying with xmlspy since yesterday. It has a mechanism to create any type of schema file ( such as DTD,DCD, XML-DATA, BizTalk etc). The problem here is, after generating the DCD file by itself, it is giving error while validating the xml file. The error displayed is, 'No content model available for validation'. My doubt is, when the IDE is able to generate DCD, why it is unable to validate it? I think, this IDE is intelligent in editing any(listed) schema file but it may need a parser to be installed to validate and trasform the xml file. I do not know which parser will support DCD. thanks, venkat