How to remove the automatic date format
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 48
- Joined: Sat Jan 26, 2013 6:07 pm
How to remove the automatic date format
Post by mstrubberg »
In Oxygen 14.2, the prolog>critdates>created element has an automatic date attribute format of YYYY-MM-DD. If the date format is entered as DD Month YYYY, the document no longer is valid as this date format is not valid. Although the DITA 1.2 language spec recommends the format YYYY-MM-DD, the date attribute is a CDATA field that is not required, so why does it throw a validation error if the format is other than YYYY-MM-DD?
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to remove the automatic date format
Hi,
The specs:
http://docs.oasis-open.org/dita/v1.2/os ... vised.html
says for such an attribute something like:
so to me it seems quite mandatory. Indeed the attribute value is defined as CDATA but the description of the attribute seems quite clear. Maybe you should also write about this on the DITA Users List, maybe we can get some feedback from Eliot Kimber or others who wrote the specification.
Regards,
Radu
The specs:
http://docs.oasis-open.org/dita/v1.2/os ... vised.html
says for such an attribute something like:
Code: Select all
The publication or general availability (GA) date, entered as YYYY-MM-DD, where YYYY is the year, MM is the month from 01 to 12, and DD is the day from 01-31.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to remove the automatic date format
The CSS in which the date picker is defined:
OXYGEN_INSTALL_DIR/frameworks/dita/css_classed/topic.css
, search for *[class~="topic/created"]:after and *[class~="topic/revised"]:after
Regards,
Radu
OXYGEN_INSTALL_DIR/frameworks/dita/css_classed/topic.css
, search for *[class~="topic/created"]:after and *[class~="topic/revised"]:after
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Wed Oct 15, 2014 10:22 pm
Re: How to remove the automatic date format
Hi oXygen team,
Does this still apply?
I am trying to remove the date picker altogether. I have a requirement to modify the date format to include seconds and time zone. I need to change the date format to "yyMMddHHmmssZ"
I modified the oxy_datePicker option. This had no effect. I also turned it off completely in Preferences > Code Templates. The date picker still shows when authoring in a topic. I also commented out the date picker code in OXYGEN_INSTALL_DIR/frameworks/dita/css_classed/topic.css. None of these have any effect.
Is there a way to override this setting?
Thanks!
Joe
Does this still apply?
I am trying to remove the date picker altogether. I have a requirement to modify the date format to include seconds and time zone. I need to change the date format to "yyMMddHHmmssZ"
I modified the oxy_datePicker option. This had no effect. I also turned it off completely in Preferences > Code Templates. The date picker still shows when authoring in a topic. I also commented out the date picker code in OXYGEN_INSTALL_DIR/frameworks/dita/css_classed/topic.css. None of these have any effect.
Is there a way to override this setting?
Thanks!
Joe
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to remove the automatic date format
Hi Joe,
So you want to remove the datepicker presented for the DITA created element, right?
If you are using Oxygen 17.0 or newer you can select the element in the Outline, then right click the selected element in the Author visual editor and choose Inspect Styles.
The CSS Inspector view should show you all CSS styles applied on the element (there are separate tabs for before and after styles). And it also lets you open the CSS stylesheets exactly at the place where each selector is defined.
The *[class~="topic/created"]:before CSS selector you are looking for should be in the OXYGEN_INSTALL_DIR\frameworks\dita\css\core\-topic-metadata-prolog.css but its location might depend on the Oxygen version and on whether or not you are using a custom DITA framework.
So the CSS inspector is quite useful to debug such cases.
Regards,
Radu
So you want to remove the datepicker presented for the DITA created element, right?
If you are using Oxygen 17.0 or newer you can select the element in the Outline, then right click the selected element in the Author visual editor and choose Inspect Styles.
The CSS Inspector view should show you all CSS styles applied on the element (there are separate tabs for before and after styles). And it also lets you open the CSS stylesheets exactly at the place where each selector is defined.
The *[class~="topic/created"]:before CSS selector you are looking for should be in the OXYGEN_INSTALL_DIR\frameworks\dita\css\core\-topic-metadata-prolog.css but its location might depend on the Oxygen version and on whether or not you are using a custom DITA framework.
So the CSS inspector is quite useful to debug such cases.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 21
- Joined: Wed Jan 25, 2017 11:21 pm
Re: How to remove the automatic date format
Hi Radu, where in the custom framework should this be saved? When you are editing the framework's preferences, I mean? I try to save it in the CSS tab from "Author" but that doesn't seem to be the right location.Radu wrote:... but its location might depend on the Oxygen version and on whether or not you are using a custom DITA framework.
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)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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