• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Trouble with conditional build tags

New Here ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

I'm having problems with conditional build tags that don't seem to work at content level in some of my help topics. I've got two tags that each correspond to a specific version of the software the help is intended for. Let's call the tags A and B.

I'm using these tags in the following manner:
- Some parts of some topics are valid for both versions of the software, and are thus left untagged.
- Some parts of some topics are valid for only one version, and is tagged correspondingly with either A or B.
- No text is ever tagged with both A and B.

Now, the following problems arise with some of the topics - but not all - tagged in this way:

- When generating output (irrespective of what type of Single Source Layout is used) all the topic's contents are published, no matter how it is tagged. The conditional build expression used is either "A AND NOT B" or the other way around: "B AND NOT A".

- When generating printed documentation (Word), the tagging comments are brought along with the tagged content into the generated document, but still, all content, irrespective of tagging, is published for these topics (but once again, not all topics).

I have tried to find out if there is any difference at all between the topics that work as expected and those that don't, but have found none. I have also tried the "saving-in-txt"-trick suggested in another thread to no avail.

The project was created in ancient times using RoboHelp Office X4.1, where the problem was first noted as we recently started employing conditional build tags extensively. I have also tried using (an evaluation copy of) RoboHelp 6 for Word but the result remains the same.

Copying the topic content into new topics in a new project (in RoboHelp 6 for Word) seems to have resolved the problem, but in a project with literally thousands of topics, this isn't really a viable option, except as an absolutely last resort. I'm a software developer, after all, not a full-time technical writer.

Has anyone experienced similar problems and is there a simpler solution than copying all topics into a new project?

Thanks in advance,
Kristian

Views

709

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

What I'd try is to change the conditional build expressions. If you use just "NOT A" you'll get all the untagged text plus the text tagged with "B". Likewise NOT B gets all the untagged text plus the text tagged with "A". Build expressions normally work on the basis of exclusion.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

Ah, okay. I got that bit of my post wrong. What I actually do is use a conditional build expression fo the following kind: "NOT A AND NOT C" where C is used for an older version of the software.

The problem is that even though I've specifically excluded the "A" content it still shows up inte the output along with the "B" content.

Any thoughts on why this does not work in my old project but does work very well indeed when the old content is copied into new topics in a new project? Could there be some old traces of junk in the old X4.1 project .docs that screw the topics up?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

Very possibly Kristian. I could be wrong here but I believe that build tags were introduced in X4 so have come a long way since then. You may want to try removing and adding the build expressions. With a bit of thought you may be able to use a find and replace tool to do this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

quote:

Originally posted by: Colum McAndrew
You may want to try removing and adding the build expressions.


Do you mean remove and replace the build tags?

I've also considered the possibility of writing a "preprocessing" macro to simply format all unwanted tagged content as "hidden" before generating the SSL...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

Sorry Kristian. Yes I meant build tags. It's been a long day and it's not even lunch yet

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

Hi Colum

Just a bit of trivia here. For RoboHelp HTML, build tags themselves appeared in the product in version 2000 (logically, version 8). Version X3 introduced the ability to apply them at the content level (applying to individual words, characters or images).

Cheers all... Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

Blimey Rick. Was it really that long ago. I feel really old now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

Okay, thanks, I'll try that. Thanks for your help, or willingness to help at least. 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

It may be worth taking a minute to look at the html code for the topics that don't work the way you expect them to work.

Generally, tagged text starts with an "x-condition" span and ends with a < / span>

Sometimes the x-condition goes inside a "style = " phrase or into the opening span tag for another trait.

That's all OK usually. But sometimes when you apply and unapply tags, or reapply a previously removed tag, the source code becomes confused. End-span tags get lost, or the begin/end tags become nested or overlapping. When the tag code gets jumbled, you can't straighten it out from the WYSIWYG editor.

You say the problem occurs in some but not all situations. Maybe you can simply remove all tags from the problem topics only, and carefully apply them from scratch.

Harvey

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

I should add that starting a new project and importing tagged topics may cause a problem.

Make sure you know exactly which tags are in the topics to be imported, and create those tags in the new project before you import topics. In other words, when RH sees an incoming tag it doesn't already know about, it may or may not keep the incoming tag. If it keeps the mystery tag, and later you create a tag of the same name, RH may not associate the two.

Harvey

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 16, 2007 Oct 16, 2007

Copy link to clipboard

Copied

Further to Harvey's post, I've also seen RH respond badly to old tags that got imported with topics, but were never created in the new project. I don't know at what point this occurs, but RH will sometimes repeat instances of the bogus tag inside the topic. So, let's say you start off with this tag inside your topic: <meta name="build tags" content=bogus_tag>. After a while, RH sometimes compounds the problem, and the tag ends up looking like this: <meta name="build tags" content=bogus_tag,bogus_tag,bogus_tag,bogus_tag>. Or worse. The strings can get quite long. (It might use semicolons instead of commas. I don't remember now.)

The bad thing is that this tends to happen totally without you realizing it, until you run into some kind of erratic behavior in the affected topics.

G

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2007 Oct 17, 2007

Copy link to clipboard

Copied

LATEST
First off: thanks for all the feedback, everyone! Next, a clarification: I'm working in RoboHelp for Word, not the HTML version, so there is no code to examine (or is there?).

I have tried importing the project (.hpj-file) into RH for HTML, but have run into the problem with disappearing build tags described in the knowledge base. Following the instructions there, I've been able to recreate the tags themselves, in the sense that they were finally to be found in the Conditional Build Tags list. I have not, however, been able to recover my topic/content "tag state", meaning simply that the tags have not been applied to my help content, neither at topic nor at content level.

Is there a trick to this that I'm missing or will I have to reapply tags to the entire project?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp