protxml2html.pl IProphet XSL Fix

10 views
Skip to first unread message

dctrud

unread,
Nov 4, 2009, 6:47:09 AM11/4/09
to spctools-discuss
All,

I've previously had problems getting iProphet .prot.xml to display
correctly when using xsltproc on Fedora Core 8 as the xslt processor.
Everything worked with Xalan but not xsltproc, and error messages
where confusing. I've now had a chance to debug the xsl, and the issue
is that an xsl:param tag is incorrectly positioned - it is not the
first entry in its xsl:template tag. Xalan was coping with this, but
xsltproc does not like it. The following change to protxml2html.pl
fixes this problem:

Move protxml2html.pl line 4727 above line 4726, e.g.

print XSL '<xsl:template match="protx:indistinguishable_peptide">';
print XSL '<xsl:variable name="PepMass"><xsl:if
test="@calc_neutral_pep_mass"><xsl:value-of
select="@calc_neutral_pep_mass"/></xsl:if></xsl:variable>';
print XSL '<xsl:param name="mypep"/>';

becomes:

print XSL '<xsl:template match="protx:indistinguishable_peptide">';
print XSL '<xsl:param name="mypep"/>';
print XSL '<xsl:variable name="PepMass"><xsl:if
test="@calc_neutral_pep_mass"><xsl:value-of
select="@calc_neutral_pep_mass"/></xsl:if></xsl:variable>';

This was easy to find by running everything through saxon-xslt, an
alternative processor which tends to give vastly more helpful and
specific error messages than xsltproc.

Cheers,

DT
Reply all
Reply to author
Forward
0 new messages