[thelist] XSLT XML output to XML

Anthony Baratta anthony at baratta.com
Fri Apr 13 21:28:40 CDT 2007

Knowing a little bit more about the XML Schema you are working with 
would help...but here a guess hack.

Inside your XSL Template:

<xsl:foreach select="[some xpath to get all node you want]">
   <xsl:if test="self::[slot:key]!='gncInvoice'">
      [...do something here...]

My familiarity with XML Namespaces is near zero, so you need to know how 
to select for the child element slot:key. My hackish guess is not really 
close - just point to what you need to do.

Jon Molesa wrote:
> Hey guys I hope this is quick and easy for one of you.
> I have an XML file I want to transform to another XML file.
> I want to ignore <gnc:transaction> if it contains <slot:key>gncInvoice</slot:key>.
> I'm using xsltproc.
> Any help is appreciated.

More information about the thelist mailing list