critdates not validating in Oxygen
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 110
- Joined: Fri May 14, 2010 12:14 am
critdates not validating in Oxygen
I have a test map to explore metadata options for a map and I have a couple questions:
(1) Why would critdates be flagged as invalid in Oxygen when the error message indicates it should be fine in the topicmeta model:
<navtitle>?, <linktext>?, <searchtitle>?, <shortdesc>?, <author>*, <source>?, <publisher>?, <copyright>*, <critdates>?, <permissions>?, <metadata>*, <audience>*, <category>*, <keywords>, <exportanchors> <exportanchors>*, <prodinfo>*, <othermeta>*, <resourceid>*, <ux-window>*, (<data> | <sort-as> | <data-about> | <foreign> | <unknown>)*
...
<map>
<title>MetaData Test</title>
<topicmeta>
<copyright>
<critdates>
<created date="Big Bang"/>
<revised modified="The Now"/>
</critdates>
</topicmeta>
...
</map>
(2) The date attribute values in the created and revised elements appear to allow any text string with no validation of any format. I saw conflicting references in the docs that said that YYYY was the format in <copyryear>, but more specific in the above date attributes, MM-DD-YYYY or something similar. These don't appear to be validated as dates, obviously.
(1) Why would critdates be flagged as invalid in Oxygen when the error message indicates it should be fine in the topicmeta model:
<navtitle>?, <linktext>?, <searchtitle>?, <shortdesc>?, <author>*, <source>?, <publisher>?, <copyright>*, <critdates>?, <permissions>?, <metadata>*, <audience>*, <category>*, <keywords>, <exportanchors> <exportanchors>*, <prodinfo>*, <othermeta>*, <resourceid>*, <ux-window>*, (<data> | <sort-as> | <data-about> | <foreign> | <unknown>)*
...
<map>
<title>MetaData Test</title>
<topicmeta>
<copyright>
<critdates>
<created date="Big Bang"/>
<revised modified="The Now"/>
</critdates>
</topicmeta>
...
</map>
(2) The date attribute values in the created and revised elements appear to allow any text string with no validation of any format. I saw conflicting references in the docs that said that YYYY was the format in <copyryear>, but more specific in the above date attributes, MM-DD-YYYY or something similar. These don't appear to be validated as dates, obviously.
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: critdates not validating in Oxygen
Hi John,
So:
(2) The date attribute values in the created and revised elements appear to allow any text string with no validation of any format. I saw conflicting references in the docs that said that YYYY was the format in <copyryear>, but more specific in the above date attributes, MM-DD-YYYY or something similar. These don't appear to be validated as dates, obviously.[/quote]
We do not control the DITA specification but you can add your own custom Schematron checks.
For example our DITA prolog updater add-on has a setting which can be used to control in what format the date should be generated:
https://github.com/oxygenxml/oxygen-dita-prolog-updater
Regards,
Radu
So:
Because you added the "critdates" inside the "copyright" instead of adding the element directly in the "topicmeta".1) Why would critdates be flagged as invalid in Oxygen when the error message indicates it should be fine in the topicmeta model:
(2) The date attribute values in the created and revised elements appear to allow any text string with no validation of any format. I saw conflicting references in the docs that said that YYYY was the format in <copyryear>, but more specific in the above date attributes, MM-DD-YYYY or something similar. These don't appear to be validated as dates, obviously.[/quote]
We do not control the DITA specification but you can add your own custom Schematron checks.
For example our DITA prolog updater add-on has a setting which can be used to control in what format the date should be generated:
https://github.com/oxygenxml/oxygen-dita-prolog-updater
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 110
- Joined: Fri May 14, 2010 12:14 am
Re: critdates not validating in Oxygen
Sorry. That was a copy-paste accident. Here's the source in which critdates was marked invalid:
BTW, how are spaces preserved in this Forum's version of BBCode? I tried a few different methods that I researched, including code and codebox, but they either made no difference in the post's formatting or the BBCode tags were rendered as if they were just part of the post's text instead of as a directive.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>MetaData Test</title>
<topicmeta>
<copyright>
<copyryear year="April Fools Day"/>
<copyrholder>Nokia</copyrholder>
</copyright>
<prodinfo>
<prodname>Bass-o-matic</prodname>
<prognum>PN3423345G</prognum>
</prodinfo>
[color=#FF0000] <critdates>
<created date="Big Bang"/>
<revised modified="The Now"/>
</critdates>[/color]
<othermeta name="hairColor" content="brown"/>
</topicmeta>
<topicref href="../Documents/gitworks/dt-ditatestdocs/oxygen_guide/tasks/untitled1.dita"/>
</map>
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: critdates not validating in Oxygen
Hi John,
I edited your post and used "code" blocks for your XML content, it does not preserve those color highlights you added but I can live with it. I'm not sure how the PHPBB forum allows adding colors inside code blocks, probably it does not. I will add an internal issue to figure this out.
About your question, originally you pasted the entire content model of the "topicmeta" element. What can be seen in it is that the <prodinfo> must be added after the <critdates>:
Regards,
Radu
I edited your post and used "code" blocks for your XML content, it does not preserve those color highlights you added but I can live with it. I'm not sure how the PHPBB forum allows adding colors inside code blocks, probably it does not. I will add an internal issue to figure this out.
About your question, originally you pasted the entire content model of the "topicmeta" element. What can be seen in it is that the <prodinfo> must be added after the <critdates>:
Code: Select all
<topicmeta>
<author type="contributor">radu_coravu</author>
<copyright>
<copyryear year="April Fools Day"/>
<copyrholder>Nokia</copyrholder>
</copyright>
<critdates>
<created date="Big Bang"/>
<revised modified="The Now"/>
</critdates>
<prodinfo>
<prodname>Bass-o-matic</prodname>
<prognum>PN3423345G</prognum>
</prodinfo>
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
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