[xsl] Flagging records that don't match a particular pattern

Subject: [xsl] Flagging records that don't match a particular pattern
From: "Grant Slade" <grant.slade@xxxxxxxxx>
Date: Mon, 19 Mar 2007 19:06:31 -0600
Hello - I am relatively new to xslt.  I was wondering how to flag
records that don't match a pattern.  I am going to be iterating
through about 8000 xml files in java transforming them from one xml to
another format required by a different company.  I know that I am
going to miss some of the patterns at first but was wondering if
there's a way to flag the files that don't match up and maybe write
them to a seperate directory.

For example in matching author tags (<AU>Slade, Grant^Riggins,
John</Au>) - could I do something in the xsl:otherwise part?:
  <xsl:template match="AU">
       <contrib contrib-type="author">
               <xsl:when test="contains(., '^')">
                   <xsl:for-each select="tokenize(.,'\^')">
                           <xsl:when test="contains(.,',')">
               <xsl:otherwise>OUTPUT TO DIFFERENT DIRECTORY

Current Thread