[liblouis-liblouisxml] Re: One small question on XPATH

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 24 Mar 2014 14:35:48 +0000

However the LibLouisUTDML documentation on XPATH semantic actions says that you should not rely on xpath expressions being applied in a particular order.


My question was relating to xpath and normal semantic actions, are these reliably applied in a given order or are they potentially unreliable as well?

Michael Whapples
On 24/03/2014 14:24, Keith Creasy wrote:
Michael.

I was planning to have Heba fix this as she needs the experience. Maybe John 
Boyer can check me on this but I believe the first math in the Semantic action 
file is used so you could just arrange them from more specific to more general 
to make it simpler. Otherwise then, yes, you'd have to be sure the patterns 
were not redundant.



-----Original Message-----
From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx 
[mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Michael Whapples
Sent: Monday, March 24, 2014 9:55 AM
To: liblouis-liblouisxml@xxxxxxxxxxxxx
Subject: [liblouis-liblouisxml] One small question on XPATH

Hello,
One use for XPATH semantic actions is to treat paragraphs inside lists and 
tables differently to other paragraphs.

I have the xpath expressions for detecting those working fine, but I have a 
small question relating to it.

The xpath expression is something like:
//xhtml:li/xhtml:p
However the normal semantic action for paragraphs is also defined:
para p

My question is, should I change the paragraph semantic action file to exclude p 
elements inside lists?

Potentially at the moment these sets could overlap, can I rely on xpath 
expressions being applied before normal semantic actions?

Michael Whapples
For a description of the software, to download it and links to project pages go 
to http://www.abilitiessoft.com
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: