|
next
|
 Subject: DTD to XML conversion errors Author: venkata subrahmanyam Date: 17 Feb 2006 05:28 PM
|
Hi,
When i am tryin to convert DTD file to XML file ,i am getting beolow errors while validating.
=================Message starts here================
Validating 161_show_shipment_005.xml...
file:///d:/venkat/shipping inbound/WIP/Feb11/161_show_shipment_005.xml:2,102: warning: Element 'CARDID' was referenced in a content model but never declared
file:///d:/venkat/shipping inbound/WIP/Feb11/161_show_shipment_005.xml:2,102: warning: Element 'TEXT' was referenced in a content model but never declared
file:///d:/venkat/shipping inbound/WIP/Feb11/161_show_shipment_005.xml:2,102: warning: Element 'SYNCID' was referenced in a content model but never declared
file:///d:/venkat/shipping inbound/WIP/Feb11/161_show_shipment_005.xml:73,12: Unknown element 'SYNCID'
file:///d:/venkat/shipping inbound/WIP/Feb11/161_show_shipment_005.xml:167,17: Element 'URI' is not valid for content model: '(DATETIME?,QUANTITY?,CMPRSNTYPE?,CMPRSNID?,DESCRIPTN?,FILETYPE?,NOTES*,TITLE?,(FILENAME|URI),USERAREA?)'
file:///d:/venkat/shipping inbound/WIP/Feb11/161_show_shipment_005.xml:308,16: Element 'URI' is not valid for content model: '(DATETIME?,QUANTITY?,CMPRSNTYPE?,CMPRSNID?,DESCRIPTN?,FILETYPE?,NOTES*,TITLE?,(FILENAME|URI),USERAREA?)'
file:///d:/venkat/shipping inbound/WIP/Feb11/161_show_shipment_005.xml:495,17: Element 'URI' is not valid for content model: '(DATETIME?,QUANTITY?,CMPRSNTYPE?,CMPRSNID?,DESCRIPTN?,FILETYPE?,NOTES*,TITLE?,(FILENAME|URI),USERAREA?)'
file:///d:/venkat/shipping inbound/WIP/Feb11/161_show_shipment_005.xml:532,16: Element 'URI' is not valid for content model: '(DATETIME?,QUANTITY?,CMPRSNTYPE?,CMPRSNID?,DESCRIPTN?,FILETYPE?,NOTES*,TITLE?,(FILENAME|URI),USERAREA?)'
The XML document 161_show_shipment_005.xml is NOT valid (5 errors)
=================Message ends here================
I appreciate your help.
thanks
venkat
|
next
|
 Subject: DTD to XML conversion errors Author: Minollo I. Date: 19 Feb 2006 10:30 PM
|
As long as these warnings are concerned:
Validating Untitled2.xml...
warning: Element 'CARDID' was referenced in a content model but never declared
warning: Element 'TEXT' was referenced in a content model but never declared
warning: Element 'SYNCID' was referenced in a content model but never declared
...they seem to be legitimate problems; those elements are referenced as part of the content model of other elements, but they are not defined in the files you are attached. That causes the inevitable next error:
44,10: Unknown element 'SYNCID'
...because the DTD to XML wizard generates SYNCID as part of the SHIPMENT content model.
About the other errors:
278,14: Element 'URI' is not valid for content model: '(DATETIME?,QUANTITY?,CMPRSNTYPE?,CMPRSNID?,DESCRIPTN?,FILETYPE?,NOTES*,TITLE?,(FILENAME|URI),USERAREA?)'
465,15: Element 'URI' is not valid for content model: '(DATETIME?,QUANTITY?,CMPRSNTYPE?,CMPRSNID?,DESCRIPTN?,FILETYPE?,NOTES*,TITLE?,(FILENAME|URI),USERAREA?)'
502,14: Element 'URI' is not valid for content model: '(DATETIME?,QUANTITY?,CMPRSNTYPE?,CMPRSNID?,DESCRIPTN?,FILETYPE?,NOTES*,TITLE?,(FILENAME|URI),USERAREA?)'
...they are all about the fact that FILENAME and URI are in alternative as children of ATTCHREF; the wizard generates both because its goal is to generate a reasonably complete template of the structure described in the DTD. If you remove FILENAME or URI those errors will go away.
In general, the goal of the DTD to XML wizard is to create an XML template consistent with the structure described by the DTD; its goal is not to create a valid XML document. The XML Schema to XML wizard tries much harder to generate a valid XML output.
Hope this helps,
Minollo
|
|
|
|