Error while searching for text in the topic title
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 16
- Joined: Thu Dec 10, 2020 11:00 am
Error while searching for text in the topic title
I use:
oXygen XML Editor 22.1, build 2020100710
transformation scenario - DITA Map PDF - based on XSL-FO
customization directory - according to oXygen's instructions.
Via custom.xsl I'm looking for topics that have equation.
Then I look for titles of such topics.
Among them, I'm looking for titles that start with "Appendix".
But i'm getting an error in oXygen: A sequence of more than one item is not allowed as the first argument of starts-with() ("", "").
How to fix it?
Thanks in advance!
oXygen XML Editor 22.1, build 2020100710
transformation scenario - DITA Map PDF - based on XSL-FO
customization directory - according to oXygen's instructions.
Via custom.xsl I'm looking for topics that have equation.
Then I look for titles of such topics.
Among them, I'm looking for titles that start with "Appendix".
But i'm getting an error in oXygen: A sequence of more than one item is not allowed as the first argument of starts-with() ("", "").
How to fix it?
Thanks in advance!
Code: Select all
<xsl:template match="*[contains(@class, ' equation-d/equation-block ')]">
<xsl:variable name="title" select="ancestor::concept/title"/>
<xsl:if test="$title= starts-with(text(), 'Appendix')">
...
</xsl:if>
</xsl:template>
-
- Posts: 9436
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error while searching for text in the topic title
Hi,
Let's say the <title> looks like this:
An xpath like this text() returns two text nodes "abc" and "def". So it returns a sequence of strings and it also skips over the text inside the "b" element.
But the method "starts-with" takes an atomic string value as the first parameter not a sequence of strings.
You could maybe use something like this:
Regards,
Radu
Let's say the <title> looks like this:
Code: Select all
<title>abc<b>bold content</b>def</title>
But the method "starts-with" takes an atomic string value as the first parameter not a sequence of strings.
You could maybe use something like this:
Code: Select all
starts-with(string-join(.//text(), ''), 'Appendix')
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
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