Skip to main content
October 31, 2012
Question

Can you use an attribute value from a sibling?

  • October 31, 2012
  • 1 reply
  • 526 views

I'm trying to pull an attribute value from a sibling element and it's not working. Here's what I've got:

<Figure Fignbr = "8">

    <Sheet>

        <Image Sheetnbr = "4">

        <Title> Figure Title </Title>

        <FigNumber>

    </Sheet>

    <Sheet>...

My EDD for the FigNumber element is:

Suffix: Figure <$attribute[Fignbr:Figure]> (Sheet <$attribute[Sheetnbr:Image]>)

Which should (in theory) look like this:

Figure 8 (Sheet 4)

An obvious fix would be to move the attrubute from Image to Sheet, but I'm working with current files, not creating new ones, so I'm trying to avoid changing the structure. I'm using FM10.

Thanks!

ebpdx

This topic has been closed for replies.

1 reply

Inspiring
October 31, 2012

AFAIK there's not a possibility to get an attribute value of a preceding or following sibling.

structapp_dev.pdf talks about the closest attribute. But it's the closest in the anchestor axes.

Another approach could be using Autonumbering. Perhaps that could be a solution for this, without using attribute values? Depends on your requirements.

As you said, I think it's a problem of your structure design. Locically Sheetnr should be an attribute of the Sheet element.

Not only to solve this problem but having a better information model, I would change this.

You can use http://www.weststreetconsulting.com/WSC_FrameSLT.htm for instance, to convert your existing documents in an more or less easy way.

Hope this helps

Markus