I. Part
if
/dt/@id returns `comment_34232` or `comment_12` how can I make it return
34232 or 12 (in other words, replacing 'comment_' with ''
Using
substring-after(/dt/@id, '_')
II. Part
and if
/span/style returns `width: 80%;` how can I replace `width: ` and after
to %; extract 80
Using
substring-before(substring-after(/span/style, ' '), '%')
Note : using the standard XPath functions substring-before() and substring-after() .
source share