Page 1 of 1
oxygen dtd validation error
Posted: Tue Feb 23, 2010 1:35 am
by mveerasamy
Hi,
We have a parent document(we call as Topics) which has link to child documents using x:includes.
In child document say s191.xml(we call it as snippets). contains xml document with bunch of xternal reference say
Code: Select all
<xref ref-type="Inlink" rid="r388016441">
<sup>441</sup>
</xref>
if we open a parent document, all the id's resolve correctly and oxygen dose not show any error. but when we open a child document. it show the error. since the rid reference dose not exist in the child document.
is there any way to overcome this oxygen dtd violation error.
Re: oxygen dtd validation error
Posted: Tue Feb 23, 2010 1:37 am
by mveerasamy
code for topic
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//EBSCO Publishing//DTD epNLM Editing v1.0//EN" "epnlm-edit.dtd">
<article article-type="DynaMiscSummary" dtd-version="2.3" xml:lang="en">
<front>
<article-meta>
<article-id pub-id-type="IID">T600001</article-id>
<article-categories>
<subj-group subj-group-type="CoreCollection">
<subject>70</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Test</article-title>
</title-group>
<history>
<string-date/>
</history>
<custom-meta-wrap>
<custom-meta>
<meta-name/>
<meta-value/>
</custom-meta>
</custom-meta-wrap>
</article-meta>
</front>
<body>
<sec id="Top" sec-type="Top">
<title>Top</title>
<sec id="Misc1" sec-type="Misc1">
<title>Related Summaries</title>
<list list-type="bullet">
<list-item>
<p> <target target-type="inlink" id="r388016441">
<sup>479</sup>
</target></p>
</list-item>
</list>
</sec>
</sec>
<sec id="MiscSection1" sec-type="MiscSection1">
<title/>
<sec id="MiscSubSection1" sec-type="MiscSubSection1">
<title/>
<list list-type="bullet">
<list-item>
<p> [add]<xi:include href="S191.xml" xpointer="Uses_Uses"
xmlns:xi="http://www.w3.org/2001/XInclude"/></p>
</list-item>
</list>
</sec>
</sec>
</body>
</article>
code for snippet
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//EBSCO Publishing//DTD epNLM Editing v1.0//EN" "epnlm-edit.dtd">
<article article-type="snippet" dtd-version="2.3">
<front>
<article-meta>
<article-id pub-id-type="IID">S191</article-id>
<article-id pub-id-type="sourceId">388016</article-id>
<article-categories>
<subj-group subj-group-type="CoreCollection">
<subject>70</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Ciprofloxacin. Uses and Efficacy. Uses</article-title>
</title-group>
<history>
<string-date/>
</history>
<custom-meta-wrap>
<custom-meta>
<meta-name>origDocIID</meta-name>
<meta-value>233387</meta-value>
</custom-meta>
<custom-meta>
<meta-name>origDocTitle</meta-name>
<meta-value>Ciprofloxacin</meta-value>
</custom-meta>
<custom-meta>
<meta-name>source</meta-name>
<meta-value>AHFS</meta-value>
</custom-meta>
<custom-meta>
<meta-name>sourceId</meta-name>
<meta-value>388016</meta-value>
</custom-meta>
<custom-meta>
<meta-name>sourceSecId</meta-name>
<meta-value>Uses_Uses</meta-value>
</custom-meta>
<custom-meta>
<meta-name>creationMode</meta-name>
<meta-value>auto</meta-value>
</custom-meta>
</custom-meta-wrap>
</article-meta>
</front>
<body>
<sec id="Uses_Uses" sec-type="Uses">
<title>Uses</title>
<p>
<xref ref-type="Inlink" rid="r388016441">
<sup>441</sup>
</xref>
</p>
</sec>
</body>
</article>
Re: oxygen dtd validation error
Posted: Tue Feb 23, 2010 12:33 pm
by adrian
Hello,
You can validate the child documents in the context of the parent document if you create a custom validation scenario (Document Validate -> Configure Validation Scenario) in which you specify the main document(New -> Add -> Browse for the main document) and select the LIBXML processor. Afterwards you can associate this custom validation scenario with the needed documents by selecting them in the Project view(assuming you have them in a project) and choosing 'Configure Validation Scenario' from the Project contextual menu.
The problem with this LIBXML custom validation scenario is that you will no longer have "Validate as you type". It is greyed out for external processors like LIBXML. So you will have to save and validate manually(Document -> Validate -> Validate Document Ctrl+Shift+V) the child documents.
Let me know if you need further clarification.
Regards,
Adrian
Re: oxygen dtd validation error
Posted: Tue Feb 23, 2010 5:32 pm
by guna@ebscohost.com
is there any way to turn off validation for certain type of document. say for example, if the document starts with s* then disable validation.
Re: oxygen dtd validation error
Posted: Tue Feb 23, 2010 5:41 pm
by adrian
Hi,
Unfortunately that's not possible, but like I said before, if you create a LIBXML custom validation scenario and associate it with all the child files(in the Project view) then the "Validate as you type" feature will be disabled and no more errors will be reported unless you explicitly invoke the validation.
Regards,
Adrian