In my hurry, I accidentally put the attribute prefix ('@') in the examples, which I'm sure you worked out.
Nevertheless, neither <xsl:when test="Transaction/Filing/OldFilingNumber"> nor <xsl:when test="Transaction/Filing/OldFilingNumber!=''"> should cause an xpath error per se. I would suggest you look elsewhere for the cause of your problem. The column number in that message looks a bit odd (-1). I'm not familiar with the way you are doing your transforms, maybe you could try a different parser and see if you get the same error? -----Original Message----- From: bryan hansen [mailto:[EMAIL PROTECTED]] Sent: Saturday, 1 December 2001 5:39 To: [EMAIL PROTECTED] Subject: Re: AW: AW: Non existent tag error... So I am not totally clear then, does Darrens method check to see if the tag exists then? Anyways, I am still getting the XPath error with his method. Any other suggestions? Thanks, Bryan --- "Beer, Christian" <[EMAIL PROTECTED]> wrote: > Hi Darren! > > That's not completely righ. > Your tests check if the attribute named "tagname" > exists, > not the tag named "tagname". > > Christian > > -----Ursprüngliche Nachricht----- > Von: Darren Munt [mailto:[EMAIL PROTECTED]] > Gesendet: Donnerstag, 29. November 2001 23:18 > An: '[EMAIL PROTECTED]' > Betreff: RE: AW: Non existent tag error... > > > I've found that the test needs to encompass three > possibilities: > > 1. That the tag is not present; > 2. That the tag is empty (ie. tagname=''), or; > 3. That the tag is present and contains a value. > > If you use test="@tagname", the test will be true in > cases 2 and 3. However, > if you use test="not(@tagname='')" (or > test="@tagname!=''") then it will > only be true for case 3, at least this is the case > with the parser I use. So > it depends on whether or not you want different > behaviour when the tag is > missing than you want when the tag is present but > empty. > > -----Original Message----- > From: bryan hansen [mailto:[EMAIL PROTECTED]] > Sent: Friday, 30 November 2001 2:09 > To: [EMAIL PROTECTED] > Subject: Re: AW: Non existent tag error... > > > I did not solve the problem, I was going to add the > line that I said oops on in the original message, > sorry for the confusion. I will try this and see if > it > works. > > Thanks, > > Bryan > > --- "Beer, Christian" <[EMAIL PROTECTED]> wrote: > > Hi Bryan, > > > > did you solve the problem, or what does the oops > > mean?? > > > > Anyway: > > > > > <xsl:when > > test="Transaction/Filing/OldFilingNumber > > > != > > > ''"> > > > > is not right, I think! Try: > > <xsl:when > test="Transaction/Filing/OldFilingNumber"> > > > > That is the right term, the book says so. > > > > Christian > > > > -----Ursprüngliche Nachricht----- > > Von: bryan hansen [mailto:[EMAIL PROTECTED]] > > Gesendet: Mittwoch, 28. November 2001 18:16 > > An: [EMAIL PROTECTED] > > Betreff: Re: Non existent tag error... > > > > > > Oops, line 87 is the line that does the xsl:when > > test! > > > > Bryan > > > > --- bryan hansen <[EMAIL PROTECTED]> wrote: > > > I have some xsl that checks to see if a tag does > > not > > > exist: > > > > > > <fo:table-cell> > > > <fo:block text-align="start"> > > > <xsl:choose> > > > <xsl:when > > test="Transaction/Filing/OldFilingNumber > > > != > > > ''"> > > > <xsl:value-of > > > select="Transaction/Filing/OldFilingNumber"/> > > > </xsl:when> > > > <xsl:otherwise> > > > N/A > > > </xsl:otherwise> > > > </xsl:choose> > > > </fo:block> > > > </fo:table-cell> > > > > > > This was working correctly, but now I am getting > > an > > > error: > > > > > > ; SystemID: http://utstbrucc2/ucc-ack.fo.xsl; > > Line#: > > > 87; Column#: -1 > > > javax.xml.transform.TransformerException: > Unknown > > > error in XPath > > > > > > The only thing that has changed was that I > > > reinstalled > > > fop? Am I missing a required jar or have a > > different > > > version that would make this stop working? > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Yahoo! GeoCities - quick and easy web site > > hosting, > > > just $8.95/month. > > > http://geocities.yahoo.com/ps/info1 > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, email: > > > [EMAIL PROTECTED] > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! GeoCities - quick and easy web site > hosting, > > just $8.95/month. > > http://geocities.yahoo.com/ps/info1 > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, email: > > [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, email: > > [EMAIL PROTECTED] > > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! GeoCities - quick and easy web site hosting, > just $8.95/month. > http://geocities.yahoo.com/ps/info1 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, email: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, email: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, email: > [EMAIL PROTECTED] > __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]