[PHP-DEV] XSLT bug

2002-04-18 Thread Ken Egervari

If I have an XML document with 2 applications nodes and the following template in the 
style sheet

xsl:template match=application
xsl:number format=a value=position() /
xsl:value-of select=name /
br /
/xsl:template

the result is 

b. the name
d. the name2

When I think it should be a.  and b ..  For some reason, position() is returning 
the wrong result.



Re: [PHP-DEV] XSLT bug

2002-04-18 Thread derick

Hello,

this is not a PHP bug, I even wonder if it's really a bug at all. If there 
is a bug, which I dont think there is, it's in sablotron.

Derick

On Thu, 18 Apr 2002, Ken Egervari wrote:

 If I have an XML document with 2 applications nodes and the following template in 
the style sheet
 
 xsl:template match=application
 xsl:number format=a value=position() /
 xsl:value-of select=@name /
 br /
 /xsl:template
 
 the result is 
 
 b. the name
 d. the name2
 
 When I think it should be a.  and b ..  For some reason, position() is returning 
the wrong result.
 

---
 Did I help you? Consider a gift:
  http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
---
  PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Ken Egervari

Sorry, but if you have a problem your tires, you usually go to the
dealership's service department instead of going to the manufacturer.  And
this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
doesn't work (probably due to a newer sablotron release).



Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Sterling Hughes

 Sorry, but if you have a problem your tires, you usually go to the
 dealership's service department instead of going to the manufacturer.  And
 this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
 doesn't work (probably due to a newer sablotron release).

Hi, I'm Joe, outa ur friendly neighborhood tire dealership, outa
Alabamaa...  

Having eh problmmm wi disss free, err, softwaree, I'ze a
givin' uuu??  U complaining 'bout free stuff, u ingraterful
foreigne!?  Weeelll, dats ok, if _uu_ harve problemo's
wit dis software, __ karn contarct [EMAIL PROTECTED],
carmplain ta them, uuu, uuu, uuu,  microsoft freaX0r.  

I'sa takin' a break now, goin' ta go frog hunting wit my double barrel
shottoy! eehaaw!

- Jumpin' Joe Inbred

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Wez Furlong

Have you tried running it through command line xslt processors?
xsltproc (part of libxslt) gives me this output:

bthe namebr/
dthe name2br/

Admittedly, it's not identical to the output you were getting,
but then it's using a different XSLT processor.
The point is that it is still b and d.

If there was a bug in sablotron, the php-dev volunteers cannot
be held responsible - you should talk to the sablotron people,
or the libxslt people - whoever it was that wrote your xslt library.

Please tone down the strength of your comments and remember that
most (all?) of the developers here are volunteers and that if the
situation were reversed you would not enjoy having your good will
gestures thrown back in your face by someone that has not taken
the time to do the most basic research into their problems.

php-dev is for constructive discussions about the development of
php, not for bitching about your dislikes of PHP.  If you have
something to say here, it had better be constructive, have concrete
research behind it and free from ego or personal opinions of the other
people here.  If it doesn't, there are other more appropriate forums.

--Wez.

On 18/04/02, Ken Egervari [EMAIL PROTECTED] wrote:
 Sorry, but if you have a problem your tires, you usually go to the
 dealership's service department instead of going to the manufacturer.  And
 this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
 doesn't work (probably due to a newer sablotron release).




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Matt McClanahan

On Thu, Apr 18, 2002 at 12:57:21AM -0400, Ken Egervari wrote:

 If I have an XML document with 2 applications nodes and the following
 template in the style sheet
 
 xsl:template match=application
 xsl:number format=a value=position() /
 xsl:value-of select=name /
 br /
 /xsl:template
 
 the result is 
 
 b. the name
 d. the name2
 
 When I think it should be a.  and b ..  For some reason,
 position() is returning the wrong result.

Out of curiousity, why are you forcing the xsl:number value?  With
value=position() I see the same numbering (b, d) as you when I test
it with xsltproc (Which doesn't use sablotron).  Taking the value
attribute out gives the desired a, b listing.

So, perhaps it's not a bug, but instead sablotron was doing it wrong
beforehand, and has been fixed.  When behavior changes, it doesn't
always mean that the old behavior was correct.

Matt

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Ken Egervari

immature.
- Original Message -
From: Sterling Hughes [EMAIL PROTECTED]
To: Ken Egervari [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 18, 2002 2:31 PM
Subject: Re: [PHP-DEV] XSLT bug


  Sorry, but if you have a problem your tires, you usually go to the
  dealership's service department instead of going to the manufacturer.
And
  this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
  doesn't work (probably due to a newer sablotron release).

 Hi, I'm Joe, outa ur friendly neighborhood tire dealership, outa
 Alabamaa...

 Having eh problmmm wi disss free, err, softwaree, I'ze a
 givin' uuu??  U complaining 'bout free stuff, u ingraterful
 foreigne!?  Weeelll, dats ok, if _uu_ harve problemo's
 wit dis software, __ karn contarct [EMAIL PROTECTED],
 carmplain ta them, uuu, uuu, uuu,  microsoft freaX0r.

 I'sa takin' a break now, goin' ta go frog hunting wit my double barrel
 shottoy! eehaaw!

 - Jumpin' Joe Inbred



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Ken Egervari

I know that there is a workaround (which is obvious), but I just wanted to
report it.  position() is supposed to return the position of the node within
the current node list.  So i'd expect 1,2,3,4...N.  It's just strange why it
would behave otherwise.  As for doing it this way?  I'm just playing around
and noticed it.  this isn't production code at all.

- Original Message -
From: Matt McClanahan [EMAIL PROTECTED]
To: Ken Egervari [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 18, 2002 1:48 PM
Subject: Re: [PHP-DEV] XSLT bug


 On Thu, Apr 18, 2002 at 12:57:21AM -0400, Ken Egervari wrote:

  If I have an XML document with 2 applications nodes and the following
  template in the style sheet
 
  xsl:template match=application
  xsl:number format=a value=position() /
  xsl:value-of select=@name /
  br /
  /xsl:template
 
  the result is
 
  b. the name
  d. the name2
 
  When I think it should be a.  and b ..  For some reason,
  position() is returning the wrong result.

 Out of curiousity, why are you forcing the xsl:number value?  With
 value=position() I see the same numbering (b, d) as you when I test
 it with xsltproc (Which doesn't use sablotron).  Taking the value
 attribute out gives the desired a, b listing.

 So, perhaps it's not a bug, but instead sablotron was doing it wrong
 beforehand, and has been fixed.  When behavior changes, it doesn't
 always mean that the old behavior was correct.

 Matt



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Matt McClanahan

On Thu, Apr 18, 2002 at 02:09:01PM -0400, Ken Egervari wrote:

 I know that there is a workaround (which is obvious), but I just
 wanted to report it.  position() is supposed to return the position
 of the node within the current node list.  So i'd expect 1,2,3,4...N. 
 It's just strange why it would behave otherwise.  As for doing it
 this way?  I'm just playing around and noticed it.  this isn't
 production code at all.

This should've occured to me before sending the first reply, but, eh. 
Memory doesn't work so well so soon after waking up.

It actually is reporting the correct position, if your XML is
indendted.  For example:

root
  application name=a /
  application name=b /
/root

has two text nodes in it at positions 1 and 3.  So position() correctly
reports the application nodes as being at 2 and 4.  The only workaround
for that is to take all the whitespace out of your XML:

rootapplication name=a /application name=b //root

Matt

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Ken Egervari

ahh, that makes sense.  actually

template match=text()
/template

would do it too.  Cool.

- Original Message - 
From: Matt McClanahan [EMAIL PROTECTED]
To: Ken Egervari [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 18, 2002 2:12 PM
Subject: Re: [PHP-DEV] XSLT bug


 On Thu, Apr 18, 2002 at 02:09:01PM -0400, Ken Egervari wrote:
 
  I know that there is a workaround (which is obvious), but I just
  wanted to report it.  position() is supposed to return the position
  of the node within the current node list.  So i'd expect 1,2,3,4...N. 
  It's just strange why it would behave otherwise.  As for doing it
  this way?  I'm just playing around and noticed it.  this isn't
  production code at all.
 
 This should've occured to me before sending the first reply, but, eh. 
 Memory doesn't work so well so soon after waking up.
 
 It actually is reporting the correct position, if your XML is
 indendted.  For example:
 
 root
   application name=a /
   application name=b /
 /root
 
 has two text nodes in it at positions 1 and 3.  So position() correctly
 reports the application nodes as being at 2 and 4.  The only workaround
 for that is to take all the whitespace out of your XML:
 
 rootapplication name=a /application name=b //root
 
 Matt
 


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Sterling Hughes

 tone down? I approached this bug as anything but inappropriate then everyone
 starts getting all defensive on me.

 I am free from ego.  I don't think my library is the stuff.  i just made
 some valid arguments and then everyone starts feeling like they are being
 threatened or accused and making my comments much more than they are.  Then
 everyone reads those comments, sees the obvious negativity and then rides
 the band wagon thinking they are siding with the right (but noticibly
 larger) crowd.  It kind of reminds me of the red wings.
 
 I'm actually very unimpressed with how the people get all defensive, witty,
 immature and whatever else to the list.  Don't read this like, Oh Ken is
 now attacking me.  I'm not doing that.  It just seems that I post (what I
 thought) to be a valid issue about XSLT with the idea in my mind that let's
 get this solved because that is a good thing that we fix bugs.  But one
 reply after the other and everything blown out of proportion.  It makes no
 sense.


Don't know why people don't like you?  Ever notice when you enter the room
people start giggling, like they've just seen a drooling gimp?  Its
because you might be free from ego, but you're most certainly full of
something else.

You wrote a bug report, which was not only bogus, but it was _certainly_ not 
related to PHP.  Derick, one of our most dedicated and knowledgeable
developers wrote back to you, and politely told you that it was not a PHP 
related bug, which is _quite_ correct.  You then wrote back and told
him, that you don't care, if you experience the bug using php, then
you're going to complain to the php developers.

Mix that with your recent PHP framework psuedo-intellectual
masturbation that you've so kindly ejaculated into our conciousness
for the past few days -- you get a group of very annoyed developers.

-Sterling


 - Original Message -
 From: Wez Furlong [EMAIL PROTECTED]
 To: Ken Egervari [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, April 18, 2002 1:42 PM
 Subject: Re: [PHP-DEV] XSLT bug
 
 
  Have you tried running it through command line xslt processors?
  xsltproc (part of libxslt) gives me this output:
 
  bthe namebr/
  dthe name2br/
 
  Admittedly, it's not identical to the output you were getting,
  but then it's using a different XSLT processor.
  The point is that it is still b and d.
 
  If there was a bug in sablotron, the php-dev volunteers cannot
  be held responsible - you should talk to the sablotron people,
  or the libxslt people - whoever it was that wrote your xslt library.
 
  Please tone down the strength of your comments and remember that
  most (all?) of the developers here are volunteers and that if the
  situation were reversed you would not enjoy having your good will
  gestures thrown back in your face by someone that has not taken
  the time to do the most basic research into their problems.
 
  php-dev is for constructive discussions about the development of
  php, not for bitching about your dislikes of PHP.  If you have
  something to say here, it had better be constructive, have concrete
  research behind it and free from ego or personal opinions of the other
  people here.  If it doesn't, there are other more appropriate forums.
 
  --Wez.
 
  On 18/04/02, Ken Egervari [EMAIL PROTECTED] wrote:
   Sorry, but if you have a problem your tires, you usually go to the
   dealership's service department instead of going to the manufacturer.
 And
   this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
   doesn't work (probably due to a newer sablotron release).
 
 
 
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Marcus Börger

Not noticing space is a *the* common pitfall in xslt!
If you before 4.1.2 had spaces and it spit out a,b then
the earlier version did not count the text-nodes and
therefore was erroneous.

marcus

and good morning to Matt - i am nearly going to bed
if there wasn't so much work left

At 20:12 18.04.2002, Matt McClanahan wrote:
On Thu, Apr 18, 2002 at 02:09:01PM -0400, Ken Egervari wrote:

  I know that there is a workaround (which is obvious), but I just
  wanted to report it.  position() is supposed to return the position
  of the node within the current node list.  So i'd expect 1,2,3,4...N.
  It's just strange why it would behave otherwise.  As for doing it
  this way?  I'm just playing around and noticed it.  this isn't
  production code at all.

This should've occured to me before sending the first reply, but, eh.
Memory doesn't work so well so soon after waking up.

It actually is reporting the correct position, if your XML is
indendted.  For example:

root
   application name=a /
   application name=b /
/root

has two text nodes in it at positions 1 and 3.  So position() correctly
reports the application nodes as being at 2 and 4.  The only workaround
for that is to take all the whitespace out of your XML:

rootapplication name=a /application name=b //root

Matt

--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Wez Furlong

On 18/04/02, Ken Egervari [EMAIL PROTECTED] wrote:
 I'm actually very unimpressed with how the people get all defensive, witty,
 immature and whatever else to the list.  Don't read this like, Oh Ken is
 now attacking me.  I'm not doing that.  It just seems that I post (what I
 thought) to be a valid issue about XSLT with the idea in my mind that let's
 get this solved because that is a good thing that we fix bugs.

Please re-read your own response to Dericks comment about it not being
a bug (I've kept it inline below).
How would you react if the situation were reversed?

  But one
 reply after the other and everything blown out of proportion.  It makes no
 sense.

Pretend that I just said that to you, and then re-read this email.
Then take this thread to /dev/null - I have more important things to do.

--Wez.
 
 - Original Message -
 From: Wez Furlong [EMAIL PROTECTED]
 To: Ken Egervari [EMAIL PROTECTED]
  On 18/04/02, Ken Egervari [EMAIL PROTECTED] wrote:
   Sorry, but if you have a problem your tires, you usually go to the
   dealership's service department instead of going to the manufacturer.
 And
   this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
   doesn't work (probably due to a newer sablotron release).



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php