@Pierre, I am using your xsltstream to parse a xml i have downloaded using ncbi eutils. I have modified the above xls file(biostar270498.xsl) to get my desired output (Title and Abstract text). It works fine but after certain entires(~500) it throws a error. Can you please see if i have done anything wrong in the xsl or while using your tool.
Usage:
cat ~/Downloads/test_e_renal_kidney.xml | java -jar dist/xsltstream.jar -t ~/Downloads/test_e_kid_renal.xsl -n PubmedArticle
xsl file:
<xsl:stylesheet xmlns:xsl="<a href=" <a="" href="http://www.w3.org/1999/XSL/Transform" rel="nofollow">http://www.w3.org/1999/XSL/Transform" "="" rel="nofollow">http://www.w3.org/1999/XSL/Transform' version='1.0' >
<xsl:output method="text" encoding="UTF-8"/>
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:apply-templates select="PubmedArticle"/>
</xsl:template>
<xsl:template match="PubmedArticle">
<xsl:apply-templates select="MedlineCitation/Article/Abstract/AbstractText"/>
<xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
The error i am getting after ~500 so output:
[SEVERE][XsltStream]ParseError at [row,col]:[98160,6]
Message: The processing instruction target matching "[xX][mM][lL]" is not allowed.
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[98160,6]
Message: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:596)
at com.sun.xml.internal.stream.XMLEventReaderImpl.nextEvent(XMLEventReaderImpl.java:83)
at com.github.lindenb.jvarkit.tools.misc.XsltStream.doWork(XsltStream.java:590)
at com.github.lindenb.jvarkit.util.jcommander.Launcher.instanceMain(Launcher.java:763)
at com.github.lindenb.jvarkit.util.jcommander.Launcher.instanceMainWithExit(Launcher.java:926)
at com.github.lindenb.jvarkit.tools.misc.XsltStream.main(XsltStream.java:627)
[INFO][Launcher]xsltstream Exited with failure (-1)
PS i am still working to get abstract using the above xls
Thank you for your time and thank you for your tool.