This is a fragment of an XPath expression
preceding::xhtml:td[count(preceding-sibling::xhtml:td)=count(current()/preceding-sibling::xhtml:td)+1
and current()/@rowspan]
which, starting from a context node C, selects all xhtml::td elements T
satisfying the conditions
(a) T is before C in document order
(b) T is at position N among its like-named sibling elements, where C is at
position N+1 among its like-named sibling elements
(c) C has an @rowspan attribute
Exactly what use this is depends on a deeper understanding of the data model
than I possess, but I imagine it's trying to locate cells in the same column as
C, but in a previous row of the table.
Presumably this XPath fragment appears sufficiently often that the author
decided to put it in an XML entity to avoid writing it out in full every time.
If they had been using XSLT 2.0 they would almost certainly have defined a
function, and have used a function call instead.
Michael Kay
Saxonica
On 17 Jul 2017, at 08:04, Love Kumar Sharma luvks(_at_)live(_dot_)in
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
Hi Michele
Need help to understand this
'<!ENTITY preceding_rowspan_td
"preceding::xhtml:td[count(preceding-sibling::xhtml:td)=count(current()/preceding-sibling::xhtml:td)+1
and current()/@rowspan]">'
what values are in this.
Thanks
Love Kumar Sharma
From: Michele R Combs mrrothen(_at_)syr(_dot_)edu
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Friday, July 14, 2017 3:59 PM
To: 'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'
Subject: [xsl] Re: HTML tables to CALS tables conversion help
What is it you don’t understand?
Michele
From: Love Kumar Sharma luvks(_at_)live(_dot_)in
[mailto:xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com]
Sent: Friday, July 14, 2017 5:37 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] HTML tables to CALS tables conversion help
Hi Team
Hope Everyone are doing well!
I need your help to understand one of famous XSLT code.
Note: I have visited here for code.
https://trac.cnx.org/wiki/HtmlTables2CalsTables
<https://trac.cnx.org/wiki/HtmlTables2CalsTables>
Thanks
Love Kumar Sharma
+91 9716036188
XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <x-msg://11/-list/1127818> (by email
<applewebdata://E53F705D-EA15-49C7-AEFC-9A584E70E344>)
XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <x-msg://11/-list/2575504> (by email
<applewebdata://E53F705D-EA15-49C7-AEFC-9A584E70E344>)
XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <-list/293509> (by email <>)
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--