Skip to main content
Participant
October 31, 2008
Question

Variables with the colon character

  • October 31, 2008
  • 4 replies
  • 811 views
I am trying to create a variable in my book template that will reference the "xml:lang" attribute in my highest level "topic" tag. Presently ,the variable always shows up blank, I think due to the fact that FM reads the colon as an indicator to look in a specific tag for a specific attribute. Since there is no "xml" or "lang" tag it turns up no result.

Here are some options I've tried.

<$attribute[xml:lang]>
<$attribute[xml:lang:topic]>
<$attribute[topic:xml:lang]>
<$attribute["xml:lang"]>
<$attribute[(xml:lang)]>
<$attribute[xml\lang]>
<$attribute[xml/lang]>
...and other various incarnations of these

So far, the only option I can come up with that works is to create a user variable and simply change it before I publish to PDF each time or to mirror the value in an attribute which does not contain a colon like "audience" or "otherprops". Either of these is kind of a pain and I would like to avoid them if I can. If I can't, thats okay, but I'd prefer to automate as much as I can.

I am using FM 8.
This topic has been closed for replies.

4 replies

Inspiring
November 2, 2008
I am with you, Ian, and I can imagine moving the read/write rules features into XSLT pre/postprocessing.

The only special thing in the read/write rules that currently cannot be handled via XSLT is the assignment of non-Container element types. In XML-2-InDesign projects, you add certain special attributes to the content to perform this function. On the other hand, the EDD already contains all the data that is needed... so from my point of view read/write rules could become a thing of the past and developing/maintaining structured applications could be easier.

Just dreaming,

- Michael
Ian Proudfoot
Legend
November 1, 2008
Good point Michael, that is much easier if you are not using XSLT.

Since I started using XSLT, I don't use Read/Write rules for renaming. It gets far too confusing if you rename elements or attributes using XSLT and RW rules.

Ian
Inspiring
November 1, 2008
I think, you could do the name change Ian recommends as a workaround with the read/write rules as well; I love XSLT, but it is no reason to use it just because of a little renaming action like this.

- Michael
Ian Proudfoot
Legend
October 31, 2008
Matt,

I too have found this to be a problem. As I was using XSLT for input and output I transformed the "xml:lang" attribute in XML into "xml.lang" in FrameMaker.

I have also posted a bug report for this problem.

Ian