CSS (oxy_)xpath: use of current()
Oxygen general issues.
-
- Posts: 2
- Joined: Wed May 09, 2018 11:10 am
CSS (oxy_)xpath: use of current()
Post by StefanKlatt »
Dear “colleagues”
At our university we are developing a medical dialect.
In the past we were using relatively complex CSS-Statements (for authoring) that made use of current().
This worked fine in another editor, that supported current() from XSLT/Xpath also in CSS.
Here is an example (automatic pseudo-numbering of comment paragraphes)
content: xpath("count(//ns:Comment[count(following-sibling::ns:Comment[attribute::Id = current()/@Id])> 0])+1")
Does anyone see a way to realize this with oxy_xpath? The matter is "current()"
Stefan
At our university we are developing a medical dialect.
In the past we were using relatively complex CSS-Statements (for authoring) that made use of current().
This worked fine in another editor, that supported current() from XSLT/Xpath also in CSS.
Here is an example (automatic pseudo-numbering of comment paragraphes)
content: xpath("count(//ns:Comment[count(following-sibling::ns:Comment[attribute::Id = current()/@Id])> 0])+1")
Does anyone see a way to realize this with oxy_xpath? The matter is "current()"
Stefan
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: CSS (oxy_)xpath: use of current()
Hello Stefan,
We do not have an equivalent of the current() XSLT function in XPath but we do have the possibility to create the xpath by merging together multiple values.
Something like this:
post41199.html#p41193
meaning in your case something like:
Regards,
Radu
We do not have an equivalent of the current() XSLT function in XPath but we do have the possibility to create the xpath by merging together multiple values.
Something like this:
post41199.html#p41193
meaning in your case something like:
Code: Select all
oxy_xpath(oxy_concat("count(//ns:Comment[count(following-sibling::ns:Comment[attribute::Id = '", attr(Id),"])> 0])+1"))
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Wed May 09, 2018 11:10 am
Re: CSS (oxy_)xpath: use of current()
Post by StefanKlatt »
Hey Radu,
thanks for this solution - f.e. it works fine with
content: oxy_xpath(oxy_concat("//sources:entry[attribute::id='",attr(idRef),"']/child::*/string()"))
for the visualisation of @id / @idRef pairings in author mode.
Regards
Stefan
thanks for this solution - f.e. it works fine with
content: oxy_xpath(oxy_concat("//sources:entry[attribute::id='",attr(idRef),"']/child::*/string()"))
for the visualisation of @id / @idRef pairings in author mode.
Regards
Stefan
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service