Whitespace in DITA XML attribute values

Questions about XML that are not covered by the other forums should go here.
Johanna
Posts: 3
Joined: Tue Jun 23, 2020 10:53 am

Whitespace in DITA XML attribute values

Post by Johanna »

I have a colleague who's defined dozens and dozens of variables that have spaces in varid values and now sees parsing errors in Oxygen. We are using version 20 since March and the exact error says "W [Document]:java.net.MalformedURLException: ID value "xxxxx/xx xx xx" contains whitespaces". The content, where variable values should appear, shows an error saying "Error while parsing external reference". The error bar (next to the scroll bar) doesn't show any red, so this seems like valid DITA XML.

Our content management system does not complain about these varid values and my colleague says that she's used them without any problems with the previous version of Oxygen, which was 17, I think. My colleague finds it impossible to work with the parsing error as it hides the variable value that the varref attribute brings to the content. An obvious solution would be "get rid of whitespace in varid and varref attribute values", but apparently that is too much work. Is there a way to make oXygen tolerate the whitespace and allow my colleague to continue working with the current varid values that have whitespace?
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Whitespace in DITA XML attribute values

Post by Radu »

Hi Johanna,

We do not have a setting to control this. If those attribute values are defined as URIs in the specification then they should not have spaces inside them.
What precise Oxygen version are you using? Can you give me a small example with how does the DITA XML content look like for such a case?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Johanna
Posts: 3
Joined: Tue Jun 23, 2020 10:53 am

Re: Whitespace in DITA XML attribute values

Post by Johanna »

Hi Radu,

We are using <oXygen/> XML Author 20.0, build 2018042410.

I'm attaching a short file showing some problematic content.



Regards,
Johanna
Last edited by Johanna on Tue Jun 23, 2020 12:25 pm, edited 1 time in total.
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Whitespace in DITA XML attribute values

Post by Radu »

Hi Johanna,

The "varref" attribute is not part of the DITA specification, so it looks like a CMS-specific attribute which is supported by a DITA specialization created by your CMS vendors. Also by default Oxygen does not validate or expand such references because it does not know what they are.
So the expansion of such references is probably done by some CMS-specific extension added to Oxygen via a plugin or a framework configuration. Please address this problem to the CMS vendor because I don't think there is anything on our side which can be done.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Johanna
Posts: 3
Joined: Tue Jun 23, 2020 10:53 am

Re: Whitespace in DITA XML attribute values

Post by Johanna »

OK. Thanks for checking this, Radu. And sorry for barking up the wrong tree :)

Regards,
Johanna
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Whitespace in DITA XML attribute values

Post by Radu »

Hi Johanna,

No problem, this separation between what Oxygen does and what extensions a CMS adds is quite hard to make.
I remember I helped the CMS vendors with advice when they implemented the support to expand "varref", but it's their code which does the expansion using our APIs to display the expanded content.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply