Pages: 1
Print
Author Topic: conref and mandatory attributes  (Read 1413 times)
MarcB
Member

Posts: 21


« on: September 29, 2015, 08:24:42 AM »

Running XMetaL Author Enterprise 9.0.0.53 on Windows 7 Enterprise.

We use the conref feature quite extensively to distribute reused text to our documentation modules.
One example is reusing the <vrm> element from a master bookmap in multiple "local" book maps for release and version information.
So a "local" book map would have something like <vrm conref="../shared_content/master_bookmap.ditamap#release-info"/>
In the master bookmap, we have something like <vrm id="release-info" release="whatever" version="1.1"/>

However, on Save of the "local" book map, XMetaL throws a parsing error, based on the fact that <vrm> requires the @version attribute.

Should the XMetaL parser not follow the conref and notice that the reused <vrm> element is present and correct?

On a side note: we tried shutting the parser up by inserting a "local" @version attribute, but found that in production (Webworks ePublisher/Automap), the "local" value trumps the conref.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2450



WWW
« Reply #1 on: September 29, 2015, 02:48:41 PM »

Any attribute (or element) that is required by the DTD (and therefore the XML Recommendation) must be in the document otherwise the document is considered invalid and XMetaL Author (and any other validating XML parser) will notify you via a validation error.

In this case I suspect you will need to use the value "-dita-use-conref-target". That will allow it to pass the basic XML validation test against the DTD, and it should cause tools like the DITA OT or whatever else you are using to pull in the value specified in the target (using the rules defined by the DITA specs).

See: http://docs.oasis-open.org/dita/v1.1/OS/langspec/common/ditauseconreftarget.html
Logged
MarcB
Member

Posts: 21


« Reply #2 on: October 27, 2015, 07:17:08 AM »

Thanks Derek for that link, I had overlooked that aspect.
Works as designed :-)

Marc
Logged
Pages: 1
Print
Jump to: