开发者

Working with node-sets in Xpath 1.0

I'm working with CALS tables which has multiple colspec elements with tgroup element as a parent. In xpath 2.0 the following works:

colspec/substring-before( @colwidth , '*' )

In xpath 1.0 it complains: Unexpected token - "substring-before( @colwid"

T开发者_如何学运维here has to be a way to accomplish this. I need to sum the number values before the asterisk so that I can convert the relative column widths to percentages. At this point in the day I can't even think of an inelegant solution.


In xpath 1.0 it complains: Unexpected token - "substring-before( @colwid"

That's because right term of / step operator can't be a function call in XPath 1.0 (This is a feature of XPath 2.0!).

You have to develop a recursive template.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜