<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>
</p>
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 14px;" lang="x-unicode">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</div>
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 14px;" lang="x-unicode">Christian Achter
<br>
University of Bern
<br>
<br>
</div>
</body>
</html>