Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
DCR DOCTYPE Xpath error
Jeremy
Hi,
We are wanting to parse our DCR's using XPath, however XPath cannot seem to find the correct DTD in the DCR.
We ammended our datacapture.cfg to reflect the path to the DTD, however this is not the problem as we don't seem to be able to specify the path to the DTD in the DCR. Is this possible? Do we maybe need to specify the path to the DTD in a path variable somewhere? I am not too familiar with Solaris so help would be required here!
The top of the DCR is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE record SYSTEM "dcr4.5.dtd">
We are running 5.5.2 on Solaris. This makes me question why there is no dcr.5.0.dtd file in /local/config/ ?
A snippet of the top of the datacapture.cfg is as follows:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE data-capture-requirements SYSTEM "file:///apps/iw-home/local/config/datacapture5.0.dtd">
Any help would be much appreciated.
Thanks,
Jeremy
Find more posts tagged with
Comments
Migrateduser
I think the problem is with the DTD specified in the DCR, not the DCT. What language are you parsing them with?
In Java I have to do this:
this._objDocument = this._objDocumentBuilderFactory.newDocumentBuilder().parse( new FileInputStream( fileInput ), "file:///" + ( IWConstants.IWHOME + CMSConstants.SLASH + "local" + CMSConstants.SLASH + "config" + CMSConstants.SLASH ).replace( ':', '|' ).replace( '\\', '/' ));
The second parameter to parse tells it to look in file:///C|/iw-home/local/config for the DTD.
Jeremy
Thanks for the response. We are doing the validation with Perl -> XML::XPath.
We were hoping there was a way of switching off inserting the
SYSTEM "dcr.4.5.dtd"
of the DOCTYPE declaration? Or else specifying the complete path to the DTD?
If we remove this line and then run the XPath validator it works fine. We can still edit the dcr in the templating client. But if we then make a change to the DCR (in the templating client) then it inserts the SYSTEM bit back again!
But we have come up with a solution as we did not want to read in the dcr and edit it to remove that section of the DOCTYPE as it will change the last modified date.
XPath can read in the file into memory, so we can then validate it from there after removing that line without worrying about the last modified date.
Thanks for the help!
Jeremy
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE record SYSTEM "dcr4.5.dtd">
james1
It should be able to find the DTD if you chdir into IWHOME/local/config.
-- James
--
James H Koh
Interwoven Engineering