List of the processing-instruction names in a file?

V

Vincent Lefevre

How can I get the list of the processing-instruction names in a file?

I tried the Muenchian method; it works on the element names for
instance, but if I replace * by processing-instruction() to use
it on the processing-instructions, I get nothing.
 
V

Vincent Lefevre

Dimitre Novatchev said:
Probably your starting code is wrong.

I'm quite sure it was correct.
The Muenchian method works nicely:
[...]

I've tried your example, and I get nothing with xsltproc (with the
tests I've done yesterday, it seems that PIs are not matched in
xsl:key). I'm going to fill a bug report.
 
D

Dimitre Novatchev

Yes, it is a bug -- I get "Transformation failed" with no more specific
error message. My libXslt is at least 3 months old.

=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL


Vincent Lefevre said:
Dimitre Novatchev said:
Probably your starting code is wrong.

I'm quite sure it was correct.
The Muenchian method works nicely:
[...]

I've tried your example, and I get nothing with xsltproc (with the
tests I've done yesterday, it seems that PIs are not matched in
xsl:key). I'm going to fill a bug report.

--
Vincent Lefèvre <[email protected]> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
 
P

Peter Flynn

Vincent said:
How can I get the list of the processing-instruction names in a file?

$ tr '\012\074' '\040\012' <foo.xml | grep '^?' | awk '{print substr($1,2)}'

///Peter
 
V

Vincent Lefevre

I forgot to say that I needed that in XSLT (but then, the problem was
a bug in libxslt).
$ tr '\012\074' '\040\012' <foo.xml | grep '^?' | awk '{print substr($1,2)}'

which doesn't work anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top