Subject: Re: [xsl] Running xsltproc does not produce any output From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 21 Jul 2024 15:00:08 -0000 |
On 21/07/2024 16:43, ohaya ohaya@xxxxxxxxx wrote: > > I am going to have to modify one of the base XSLTs so I wanted to try > xsltproc (on CENTOS) to test/debug, but when I ran a sample XML output > using one of the base XSLTs, xsltproc doesn't produce any output (and > no errors either), so I was hoping someone might be able to tell me why. > > The base XSLT references an additional small XSLT via an "xsl:import". Your XSLT seems to look for a syslog root element or at least a container element for the audit_record element but your XML sample has a single audit_record root element. > > Here's the base XSLT: > > <?xml version="1.0"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > B B B <xsl:import href='rfc.xsl'/> > B B B <xsl:output method='text' version='1.0' encoding='UTF-8'/> > B B B <xsl:key name="CAProperty_Name" match="CAProperty" use="@Name"/> > B B B <xsl:template match="/"> > B B B B B B B <xsl:apply-imports/> > B B B B B B B <xsl:for-each select="syslog/audit_record"> > > > AND here's the small XSLT that is supposed to be imported: > > > <?xml version="1.0"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:output method='text' version='1.0' encoding='UTF-8'/> > <xsl:template match="*"> > B B B B B B B <xsl:choose> > B B B B B B B B B B <xsl:when test="audit_record/Rfc='yes'"> > > > > AND here's a sample XML that I captured: > > > B <audit_record> > B B B <Rfc>yes</Rfc> > B B B <Timestamp>Jul 21 01:10:30</Timestamp> > <IsoTimestamp>2024-07-21T01:10:30Z</IsoTimestamp> > B B B <Hostname>VAU01</Hostname>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Running xsltproc does not pro, ohaya ohaya@xxxxxxxx | Thread | Re: [xsl] Running xsltproc does not, ohaya ohaya@xxxxxxxx |
[xsl] Running xsltproc does not pro, ohaya ohaya@xxxxxxxx | Date | Re: [xsl] Running xsltproc does not, ohaya ohaya@xxxxxxxx |
Month |