Information in XML file only

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
John Johann
Posts: 305
Joined: Mon Aug 21, 2017 7:35 pm

Information in XML file only

Unread post by John Johann »

What is the best way to include informaiton in the XML file which does not get output?

It should be sort of meta information for whoever opens the XML file.

Do I need to use

Code: Select all

<conditional-text type="IFNOT" value="CHM,HTML,PDF,HXS,PRINT,EBOOK"/>This text is for XML eyes only<conditional-text type="END"/>
or perhaps

Code: Select all

<conditional-text type="IF" value="HIDDEN_META"/>This text is for XML eyes only<conditional-text type="END"/>
or is there a neater way?
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Information in XML file only

Unread post by Tim Green »

Hi John,

Don't do that, the XML is checked for well-formedness and anything not conforming to the HM XML schema will be stripped out silently. Annoying, I know, but XML hast to be 100% syntax-perfect, that's the only way you can guarantee correct translation into so many different output formats.

However, what is supported is personal meta tags that you can add at the top of the topic, inside the <topic> </topic> tag pair, like this:
<meta name="mymetatag" value="My Meta Information" />
You can read the values stored there into your topic body if you want, using the TOPICMETA variable like this:

<%TOPICMETA:MYMETATAG%>

You type this in manually. The variable above would insert the value from the example tag above, if it is present in the topic in which the variable is used.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
John Johann
Posts: 305
Joined: Mon Aug 21, 2017 7:35 pm

Re: Information in XML file only

Unread post by John Johann »

Thanks Tim,
I should have put the paragraph tags around my two examples -- anyone using H&M should be able to see / read /change the info (e.g. editor's notes which document the reasons why things were changed) displayed.

For some of the info, the mymetag tag sounds like a very interesting possibility to add more than I had originally considered :-).
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Information in XML file only

Unread post by Tim Green »

John Johann wrote: I should have put the paragraph tags around my two examples -- anyone using H&M should be able to see / read /change the info (e.g. editor's notes which document the reasons why things were changed) displayed.
At the moment there isn't any way to add meta data like that without actually editing the XML. This may be added to the Topic Options in the future. The best way to do this at the moment is directly in the XML editor tab in Help+Manual itself, because then any XML errors will be corrected automatically when you switch back to the normal editor.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply