<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>... and your <a moz-do-not-send="true"
href="https://stackoverflow.com/questions/58581679/xpath-and-css-in-oxygen-xml-author-how-to-create-a-dynamic-parameter-in-oxy-xpa?answertab=oldest#tab-top">answer</a>
absolutely solved solved my problem. I feel a bit ashame I didn't
have the idea myself to step outside of the string literal and
compute the attribute value first.</p>
<p>I also <a moz-do-not-send="true"
href="https://stackoverflow.com/help/someone-answers">learnt
today</a> that one should not say "thank you" in a comment on
Stackoverflow so I say thank you here, dear Radu.</p>
<p>Kind regards<br>
Christian</p>
<p><br>
</p>
<div class="moz-cite-prefix">Am 28.10.2019 um 07:50 schrieb Oxygen
XML Editor Support (Radu Coravu) :<br>
</div>
<blockquote type="cite"
cite="mid:26473e96-03f7-50f9-d14a-22c9047966de@oxygenxml.com">Hi
Christian,
<br>
<br>
I replied to you on the StackOverflow post:
<br>
<br>
<a class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/58581679/xpath-and-css-in-oxygen-xml-author-how-to-create-a-dynamic-parameter-in-oxy-xpa/58586584#58586584">https://stackoverflow.com/questions/58581679/xpath-and-css-in-oxygen-xml-author-how-to-create-a-dynamic-parameter-in-oxy-xpa/58586584#58586584</a>
<br>
<br>
Regards,
<br>
Radu
<br>
<br>
Radu Coravu
<br>
<oXygen/> XML Editor
<br>
<a class="moz-txt-link-freetext" href="http://www.oxygenxml.com">http://www.oxygenxml.com</a>
<br>
<br>
On 10/25/2019 4:25 PM, Christian Achter wrote:
<br>
<blockquote type="cite">Dear mailinglist members.
<br>
<br>
I am creating an Oxygen framework to display XML data in Oxygen
XML Author's Author mode. This is part of the XML I have with
two nodes <ab> in it:
<br>
<br>
<TEI>
<br>
<text>
<br>
<body>
<br>
<div n="A">
<br>
<ab xml:id="n_d2e23" type="person">
<br>
<seg type="name">
<br>
<persName>
<br>
<surname>Aarberg</surname>,
<br>
<forename>Peter
von</forename>
<br>
</persName>
<br>
<roleName>König</roleName>
<br>
(<date from="ca. 1300" to="vor
1372">ca. 1300–vor 1372</date>)
<br>
</seg>
<br>
<seg type="affiliations">
<br>
<list>
<br>
<item>
<br>
<affiliation role="CEO"
hkg:orgKey="#n_123_456">Best CEO they ever
had</affiliation>
<br>
</item>
<br>
</list>
<br>
</seg>
<br>
</ab>
<br>
<br>
<ab xml:id="n_123_456" source="SW_EB"
type="organization">
<br>
<seg type="name">
<br>
<orgName>Altenburger
Hofdruckerei</orgName>
<br>
</seg>
<br>
</ab>
<br>
</div>
<br>
</body>
<br>
</text>
<br>
</TEI>
<br>
<br>
The upper <ab> node has an atribute
hkg:orgKey="#n_123_456" pointing to second element's
xml:id="n_123_456". I use the following CSS to display the value
of <orgName> of the second element in the visual
representation of the first element:
<br>
<br>
affiliation:after {
<br>
content: " role: " oxy_textfield(
<br>
edit, "@role")
<br>
" Organization ID: " oxy_textfield(
<br>
edit, "@hkg:orgKey")
<br>
"Organization name: " oxy_xpath(
<br>
"/TEI/text/body/div/ab[@xml:id='n_123_456']/seg[@type='name']/orgName/text()"
<br>
)
<br>
" " oxy_url("gfx/link_register.png");
<br>
link: attr("hkg:orgKey")
<br>
}
<br>
<br>
This works fine. But now I need to create the line
<br>
<br>
"/TEI/text/body/div/ab[@xml:id='n_123_456']/seg[@type='name']/orgName/text()"
<br>
<br>
dynamically which means: Instead of the specific value xml:id
n_123_456 it should use whatever the value of the attribute
@hkg:orgKey of the node <affiliation> is. I tried this:
<br>
<br>
"/TEI/text/body/div/ab[@xml:id=@hkg:orgKey]/seg[@type='name']/orgName/text()"
<br>
<br>
but it doesn't work. I also tried other variations like
ab[@xml:id='@hkg:orgKey'] or ab[@xml:id=attr('hkg:orgKey')] and
many more but none of them gave me the expected result.
<br>
<br>
Maybe it is a syntax problem. I really hope there will be a
solution to this and I would be very thankful for assistance.
Any help is appreciated.
<br>
<br>
I tried to send as much code as needed but of course shortened
some parts not relevant in this case. If something is missing
(or too much) please let me know.
<br>
<br>
Thanks in advance and kind regards
<br>
Christian Achter
<br>
University of Bern
<br>
<br>
<br>
_______________________________________________
<br>
oXygen-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a>
<br>
<a class="moz-txt-link-freetext" href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
<br>
<br>
</blockquote>
_______________________________________________
<br>
oXygen-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a>
<br>
<a class="moz-txt-link-freetext" href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
<br>
</blockquote>
</body>
</html>