cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Arbortext Editor: How to show processing instruction in cals-table?

SOLVED
Highlighted
Contributor

Arbortext Editor: How to show processing instruction in cals-table?

Hi,

in one of our xml-workflow we must insert a processing instructions before the <row>-Element within a cals-table.

If we do this, unfortunately we cannot see this pi in the Arbortext Editor table-view:

pi_cannot_see.png

As you can see the processing instruction is hidden. Only if we activate the markup view in tables, we can see the pi, but unfortunately in a non user-friendly view of the cals-table with markups:

pi_markup_view.png

Does anybody has an idea how we can visualize the inserted pi for the users?

We tried to do this with styler but without success. We use Arbortext Editor 6.1.M060.

Thank you in advance for your help.

Greetings from Nördlingen (Germany)

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Arbortext Editor: How to show processing instruction in cals-table?

Hi Hubert--

Everything will be the same except the contents of the generated text. Instead of just literal text "[SPECIAL ROW]", you would use Insert->XPath String, with the following expression:

     ancestor::row/preceding-sibling::node()[1]/self:Smiley Tonguerocessing-instruction('manBef')

So the entire condition would look something like this:

<Condition>

<Tests>

<XPathTest

expression="not(preceding-sibling::entry) and ancestor::row/preceding-sibling::node()[1]/self:Smiley Tonguerocessing-instruction('manBef')"/>

</Tests>

<BaseProperties>

<GeneratedText>

<AddBefore><_sfe:BeforeOrAfterText><_gte:Translate translate="on"

id="A26d4021f-be12-489d-b01a-e6cfb9dfae92"><_gte:Target lang="en"

>[SPECIAL ROW <_gte:XPathString

expr="ancestor::row/preceding-sibling::node()[1]/self:Smiley Tonguerocessing-instruction('manBef')"

/>]</_gte:Target></_gte:Translate></_sfe:BeforeOrAfterText></AddBefore>

</GeneratedText>

</BaseProperties>

</Condition>

--Clay

5 REPLIES 5

Re: Arbortext Editor: How to show processing instruction in cals-table?

Hi Hubert--

You can do this in Styler by modifying the "entry" element to check for the PI using XPath. You would add a condition to the entry element with the XPath condition to test for the preceding sibling PI node, something like this:

<Condition>

<Tests>

<XPathTest

expression="not(preceding-sibling::entry) and ancestor::row/preceding-sibling::node()[1]/self:Smiley Tonguerocessing-instruction('SpecialRow')"/>

</Tests>

<BaseProperties>

<GeneratedText>

<AddBefore><_sfe:BeforeOrAfterText><_gte:Translate translate="on"

id="A26d4021f-be12-489d-b01a-e6cfb9dfae92"><_gte:Target lang="en"

>[SPECIAL ROW]</_gte:Target></_gte:Translate></_sfe:BeforeOrAfterText

></AddBefore>

</GeneratedText>

</BaseProperties>

</Condition>

(This is the entire condition copied from Styler.)

This will add generated text to the first cell of the row if the row has a <?SpecialRow?> PI directly preceding it. (You would need to replace "SpecialRow" in the XPath with "manBef" or whatever other name your row PI's might have.)

tablepi.png

If you need to make the pseudo-attribute in the PI visible, you could add that to the gentext in the first cell via an XPath string.

--Clay

Re: Arbortext Editor: How to show processing instruction in cals-table?

Hi Clay,

delicious

thank you for your prompt help. Now we only need the attribute and value of the PI.

Our PI is like: <?manBef tpt_row_below="2mm"?>

We think it would be helpful if as generated text there is the attribute with attribute value. We tried this with adding "attribute content" as xpath but after many tries without success. Maybe you can help us again?

Re: Arbortext Editor: How to show processing instruction in cals-table?

Hi Hubert--

Everything will be the same except the contents of the generated text. Instead of just literal text "[SPECIAL ROW]", you would use Insert->XPath String, with the following expression:

     ancestor::row/preceding-sibling::node()[1]/self:Smiley Tonguerocessing-instruction('manBef')

So the entire condition would look something like this:

<Condition>

<Tests>

<XPathTest

expression="not(preceding-sibling::entry) and ancestor::row/preceding-sibling::node()[1]/self:Smiley Tonguerocessing-instruction('manBef')"/>

</Tests>

<BaseProperties>

<GeneratedText>

<AddBefore><_sfe:BeforeOrAfterText><_gte:Translate translate="on"

id="A26d4021f-be12-489d-b01a-e6cfb9dfae92"><_gte:Target lang="en"

>[SPECIAL ROW <_gte:XPathString

expr="ancestor::row/preceding-sibling::node()[1]/self:Smiley Tonguerocessing-instruction('manBef')"

/>]</_gte:Target></_gte:Translate></_sfe:BeforeOrAfterText></AddBefore>

</GeneratedText>

</BaseProperties>

</Condition>

--Clay

Re: Arbortext Editor: How to show processing instruction in cals-table?

Hi Clay,

perfect! That was absolutely what we want.

Thank you for your help.

Re: Arbortext Editor: How to show processing instruction in cals-table?

Hi Hubert--

You're welcome, glad it worked for you.

--Clay