Syntax with string-join in CSS (child elements, normalize-space)
Posted: Sat Apr 06, 2019 8:56 pm
Hi everyone!
(this topic is stemming from: post53287.html)
Thanks to Sorin's indication, I was able to transfer one condition in oxy_xpath with quotes and apostrophes in string-join (inverting both quotes and apostrophes), either to display some content
or to have a combobox (the following one with a quite non-sensical condition (all references with the same date in the 20th century, based on date as string)
However, I apparently cannot display sub-elements as labels nor work with functions such as concat() or normalize-space().
When, again, the following is working to display a string
Is there an error in the code or syntax?
Thanks for any explanation,
Dominique
(this topic is stemming from: post53287.html)
Thanks to Sorin's indication, I was able to transfer one condition in oxy_xpath with quotes and apostrophes in string-join (inverting both quotes and apostrophes), either to display some content
Code: Select all
bibl[sameAs]{
content:oxy_xpath(
oxy_concat(
"doc('${cfdu}/biblio.xml')//listBibl/biblStruct[contains(@xml:id, '", attr(sameAs),"')]/normalize-space(string())"
)
);
}
Code: Select all
bibl[sameAs]:after{
content: "Reference-id"
oxy_combobox(edit, '@sameAs',
values,
oxy_xpath(
oxy_concat(
'string-join(doc("', oxy_url('${cfdu}/biblio.xml'), '")//listBibl/biblStruct[contains(@xml:id, substring-after("',attr(sameAs),'", "19"))]/@xml:id, ",")'
)),
editable, true,
labels,
oxy_xpath(
oxy_concat(
'string-join(doc("', oxy_url('${cfdu}/biblio.xml'), '")//listBibl/biblStruct[contains(@xml:id, substring-after("',attr(sameAs),'", "19"))]/@xml:id, ",")'
))
)
}
When, again, the following is working to display a string
Code: Select all
bibl[sameAs]{
content:oxy_xpath(
oxy_concat(
'string-join(doc("', oxy_url('${cfdu}/biblio.xml'), '")//listBibl/biblStruct[contains(attribute::xml:id, normalize-space("',attr(sameAs),'"))]/normalize-space(string()), ",")'
)
);
}
[\code]
I have tried with the following, with subelements that are present, always, once and only once.
[code]
bibl[sameAs]:after{
content: "Reference"
oxy_combobox(edit, '@sameAs',
values,
oxy_xpath(
oxy_concat(
'string-join(doc("', oxy_url('${cfdu}/biblio.xml'), '")//listBibl/biblStruct[contains(attribute::xml:id, "',attr(sameAs),'")]/@xml:id, ",")'
)),
editable, true,
labels,
oxy_xpath(
oxy_concat(
'string-join(doc("', oxy_url('${cfdu}/biblio.xml'), '")//listBibl/biblStruct[contains(attribute::xml:id, "',attr(sameAs),'")]/monogr/title/normalize-space(string()), ",")'
))
)
}
Thanks for any explanation,
Dominique