schematron rule for bookmap
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 140
- Joined: Fri Feb 28, 2020 4:02 pm
schematron rule for bookmap
Post by vishwavaranasi »
Hi Team , our plugin has rule files , the rules for topics was working fine ,the rule for example
this is working fine when i run "validate and check completeness"
but for the bookmap we have the following , this is just to testing purpose we have added a rule as below
this is not reporting even my bookmap has the "id" attribute. when am running "validate and check completeness"
would you please help here.
Thanks,
vishwa
Code: Select all
<sch:pattern id="shortdesc_length">
<sch:rule context="*[contains(@class, ' topic/shortdesc ')]">
<sch:let name="text" value="normalize-space(.)"/>
<sch:assert role="warning" test="string-length($text) < 250"> Short description cannot exceed 250
characters. </sch:assert>
</sch:rule>
</sch:pattern>
but for the bookmap we have the following , this is just to testing purpose we have added a rule as below
Code: Select all
<sch:pattern>
<sch:rule context="/*[contains(@class, ' bookmap/bookmap ')]" role="warn">
<sch:report test="@id">
testing id is there or not </sch:report>
</sch:rule>
</sch:pattern>
would you please help here.
Thanks,
vishwa
Thanks,
vishwa
vishwa
Re: schematron rule for bookmap
Hi,
I tested and this works for me.
The DITA Bookmap I used for tests is DTD-based:
What kind of bookmap are you using? Does it use a DTD as a schema or does it use an XML Schema or Relax NG schema? Is it a specialization of the DITA bookmap element?
Regards,
Radu
I tested and this works for me.
The DITA Bookmap I used for tests is DTD-based:
Code: Select all
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
<bookmap id="taskbook">
<booktitle>
....
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 140
- Joined: Fri Feb 28, 2020 4:02 pm
Re: schematron rule for bookmap
Post by vishwavaranasi »
Yes Radu , we have custom DTD of DITA bookmap
<!DOCTYPE bookmap PUBLIC "-//XXXXX//DTD XXX DITA Bookmap//EN" "xxxBookmap.dtd">
and similarly for task and other DITA types for example for task have this
<!DOCTYPE task PUBLIC "-//XXXXX//DTD EPM DITA Task//EN" xxxTask.dtd">
We have mapped validation to custom our rules.sch file , this rule file validating the task successfully , but for bookmap it is not.
<!DOCTYPE bookmap PUBLIC "-//XXXXX//DTD XXX DITA Bookmap//EN" "xxxBookmap.dtd">
and similarly for task and other DITA types for example for task have this
<!DOCTYPE task PUBLIC "-//XXXXX//DTD EPM DITA Task//EN" xxxTask.dtd">
We have mapped validation to custom our rules.sch file , this rule file validating the task successfully , but for bookmap it is not.
Thanks,
vishwa
vishwa
Re: schematron rule for bookmap
Hi,
Let's try this:
Open the bookmap in the Oxygen main editor area, select in the Outline view the <bookmap> root element and then look in the "Attributes" view at the value of the "class" attribute, you can right click in the table there and copy it. Is the Schematron rule properly constructed to match that @class attribute value?
Regards,
Radu
Let's try this:
Open the bookmap in the Oxygen main editor area, select in the Outline view the <bookmap> root element and then look in the "Attributes" view at the value of the "class" attribute, you can right click in the table there and copy it. Is the Schematron rule properly constructed to match that @class attribute value?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 140
- Joined: Fri Feb 28, 2020 4:02 pm
Re: schematron rule for bookmap
Post by vishwavaranasi »
yes , checked class value it showing this - map/map bookmap/bookmap
and rule tried like this
also
also
none is worked
and rule tried like this
Code: Select all
<sch:pattern id="isbookmaphasid">
<sch:rule context="/*[contains(@class, ' map/map bookmap/bookmap ')]" role="warn">
<sch:report test="@id">
testing id is there or not </sch:report>
</sch:rule>
</sch:pattern>
Code: Select all
<sch:pattern id="isbookmaphasid">
<sch:rule context="/*[contains(@class, ' map/map ')]" role="warn">
<sch:report test="@id">
testing id is there or not </sch:report>
</sch:rule>
</sch:pattern>
Code: Select all
<sch:pattern id="isbookmaphasid">
<sch:rule context="/*[contains(@class, ' bookmap/bookmap ')]" role="warn">
<sch:report test="@id">
testing id is there or not </sch:report>
</sch:rule>
</sch:pattern>
Thanks,
vishwa
vishwa
Re: schematron rule for bookmap
Hi,
This report
is triggered if there is an @id attribute set on the <bookmap> root element, I assume you have an @id attribute set on the root element, right?
Can you further simplify the rule context "contains" condition like:
does that work?
If not maybe you can put together a small sample project with a small DITA bookmap, a Schematron file, the DITA specialization DTDs, send them to us (support@oxygenxml.com) and we can take a look.
Regards,
Radu
This report
Code: Select all
<sch:report test="@id">
Can you further simplify the rule context "contains" condition like:
Code: Select all
<sch:rule context="/*[contains(@class, 'bookmap')]" role="warn">
If not maybe you can put together a small sample project with a small DITA bookmap, a Schematron file, the DITA specialization DTDs, send them to us (support@oxygenxml.com) and we can take a look.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 140
- Joined: Fri Feb 28, 2020 4:02 pm
Re: schematron rule for bookmap
Post by vishwavaranasi »
Thanks Radu , We have figured out the problem we have , the issue resolved.
Thanks,
vishwa
Thanks,
vishwa
Thanks,
vishwa
vishwa
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service