Newly created profile condition set won't 'stick' when applied

Post here questions and problems related to editing and publishing DITA content.
jgeekster
Posts: 2
Joined: Fri Dec 15, 2023 4:15 pm

Newly created profile condition set won't 'stick' when applied

Post by jgeekster »

Hi there.
Total newbie to Oxygen xml. I've used conditional output in other publishing programs so am very familiar with it, but I am having trouble implementing it in Oxygen.
I can select and apply an existing profiling attribute or condition set to a topic. I can also edit an existing profile attribute such as 'props' and apply this.
These condition sets all appear when I click the filter icon in the Dita maps editor.
In fact, when I create my own profile attributes and condition sets these also appear in the Dita maps editor.
However, when I right-click a topic and select Edit Properties to apply my profile condition it doesn't 'stick'. In other words, I select it and click OK, but in the Dita maps editor the topic is not flagged with my applied colours/styles, no coloured square appears and when I Edit Properties again I can see that my profile condition has been deselected.
Additionally, if I apply my Profile Attribute to a block of text in Author view, the colours DO show up in the text BUT I get an error "Attribute 'vb3000' is not allowed to appear in element "ph".

I am at a loss.
image 1.png
image 1.png (291.27 KiB) Viewed 345 times
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Newly created profile condition set won't 'stick' when applied

Post by Radu »

Hi,
Some DITA editing profiling videos (basic and advanced) can be found here:
https://blog.oxygenxml.com/topics/learnDita.html
What I think the main problem in your case is:
The DITA standard only has 4-5 profiling attributes like product/platform/audience:
https://www.oxygenxml.com/dita/1.3/spec ... butes.html
So usually people would go to the Oxygen Preferences->"Editor / Edit Modes / Author / Profiling/Conditional Text / Attributes and Condition Sets", locate the "DITA" profiling attribute names and add possible values for them. For example for the Oxygen user's guide we have for the "product" attribute multiple possible values like "author/editor/developer/webAuthor" corresponding to each of our products.
What you probably did was to add new attribute names for the DITA framework in the "Editor / Edit Modes / Author / Profiling/Conditional Text / Attributes and Condition Sets". But the standard still consists of these 4-5 profiling attribute values so you get errors when inserting your attribute names which are not recognized by the standard.
In the docs it says:
https://www.oxygenxml.com/doc/versions/ ... ntent.html
If you are creating a new attribute, make sure the attribute is already defined in the document DTD or schema before continuing with the procedure.
Oxygen's "Preferences->"Editor / Edit Modes / Author / Profiling/Conditional Text / Attributes and Condition Sets" page is flexible because we support multiple XML vocabularies, each providing its own set of profiling attribute names. But in order for a newly added profiling attribute to work, it would still need to be supported by the schema used for validation. For the DITA XML standard this would mean creating your own specialization, something you do not want to look into as someone who is just getting started.
So my advice for you is to set in Preferences->"Editor / Edit Modes / Author / Profiling/Conditional Text / Attributes and Condition Sets page custom values for the already existing DITA profiling attributes like audience/platform/product and use those when setting profiling attribute values on elements.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
jgeekster
Posts: 2
Joined: Fri Dec 15, 2023 4:15 pm

Re: Newly created profile condition set won't 'stick' when applied

Post by jgeekster »

Thank you Radu.
What you said was what I suspected: my new profiling attribute wasn't defined further up in the hierarchy so trying to add it further down was never going to work. I'll just repurpose the existing profiling attributes for now as that works okay. Really appreciate your swift response.
Radu wrote: Fri Dec 15, 2023 5:49 pm If you are creating a new attribute, make sure the attribute is already defined in the document DTD or schema before continuing with the procedure
... in order for a newly added profiling attribute to work, it would still need to be supported by the schema used for validation. For the DITA XML standard this would mean creating your own specialization, something you do not want to look into as someone who is just getting started.
Post Reply