Hi, On Monday 08 December 2008, Christian Boltz wrote: > [...] > > > # zypper --version > > zypper 0.11.10 > > That's an outdated zypper version ;-) - openSUSE 11.1 has zypper > 1.0.2.
I thought so. :) > I'll attach zypper output from 11.1 (and the updated XSLT file) in > case you want to test it. Looks good. No complains so far. ;-) > [...] > > If you really need this functionality, use > > the document element from the EXSLT initiative, see [1]. > > The only functionality I need is "parse the XML and output > text/plain". I don't really care how or why it works as long as it > works ;-) Well, you need it when you want to have more than one output files. > [...] > I found a working solution: > > <!-- messages, unless type="info" --> > <xsl:template match="message"> > <xsl:if test="@type != 'info'"> > <xsl:text> ERROR: </xsl:text> > <xsl:apply-templates /> > <xsl:text> </xsl:text> > </xsl:if> > </xsl:template> You can omit the xsl:if clause with a predicate in "match" to make it a bit more compact: <xsl:template match="[EMAIL PROTECTED]'info']"> <xsl:text> ERROR: </xsl:text> <xsl:apply-templates /> <xsl:text> </xsl:text> </xsl:template> Maybe you need a another template to deal with general message elements or with other message elements that contains other values in your @type attributes. I haven't tested it. With your given XML file both templates work. Well, it's a matter of style not of functionality. :) Tom -- Thomas Schraitle ---------------------------------------------------------------------- SUSE LINUX GmbH >o) Documentation Specialist Maxfeldstrasse 5 /\\ 90409 Nuernberg _\_v http://en.opensuse.org/Documentation_Team http://developer.novell.com/wiki/index.php/Lessons_for_Lizards http://lizards.opensuse.org/author/thomas-schraitle/ --------------------------------------------------------------------- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
