These are the result of my test:
doc.xml
=======
<?xml version="1.0"?>
<document>
<text> </text>
<text>a </text>
<text> a</text>
<text> a </text>
</document>
doc.xslt
========
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<xsl:apply-templates select="//text"/>
</xsl:template>
<xsl:template match="text">
Chars: <xsl:value-of select="string-length(text())"/>
</xsl:template>
</xsl:stylesheet>
Result with saxon:
================
Chars: 0
Chars: 3
Chars: 3
Chars: 3
Result with amara xslt processor:
============================
Chars: 3
Chars: 3
Chars: 3
Chars: 3
So I'm afraid there is a bug with Amara xslt processor.
lm
2012/8/6 Luis Miguel Morillas <
mori...@gmail.com>:
> 2012/8/5 Uche Ogbuji <
uc...@ogbuji.net>:
>> On Fri, Aug 3, 2012 at 11:11 AM, Luis Miguel Morillas <
mori...@gmail.com>
>> wrote:
>>>
>>> I'm working with this xslt transform
http://paste2.org/p/2093093 The
>>> result of the processor is
http://paste2.org/p/2093095 I think
>>> amara's xslt processor adds line feeds. Is it ok? The result with
>>> xsltproc is
http://paste2.org/p/2093096
>>>
>>> Is it a bug or is something wrong with the stylesheet (or I'm I not
>>> understandig it :-P)
>>
>>
>> I'd hoped to find time to delve into the code here, but I think what's
>> happening is not that amara is adding linebreaks but that it's not applying
>> the xsl:strip-space command. Out of curiosity, if you remove that, does the
>> xsltproc result match the Amara result?
>>
>> Even though this one might be an Amara bug, in general xsltproc is a very
>> bad processor to use to figure out correct behavior. Its standards
>> compliance is rather poor. It's better to compare to Saxon.
>>
>
> Ok. This is the Saxon result with xsl:strip-space command [1] I think
> Amara's not running ok the xsl:strip-space command (same result as
> Saxon without xsl:strip-space command) I'll investigate better
> tomorrow with other tests.
>
>
> [1]
http://paste2.org/p/2095676
>
>
> -- lm
>
>
>>
>> --
>> Uche Ogbuji
http://uche.ogbuji.net
>> Weblog:
http://copia.ogbuji.net
>> Poetry ed @TNB:
http://www.thenervousbreakdown.com/author/uogbuji/
>> Founding Partner, Zepheira
http://zepheira.com
>> Linked-in:
http://www.linkedin.com/in/ucheogbuji
>> Articles:
http://uche.ogbuji.net/tech/publications/
>> Friendfeed:
http://friendfeed.com/uche
>> Twitter:
http://twitter.com/uogbuji
>>
http://www.google.com/profiles/uche.ogbuji
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Akara Developers" group.
>> To post to this group, send email to
akar...@googlegroups.com.
>> To unsubscribe from this group, send email to
>>
akara-dev+...@googlegroups.com.
>> For more options, visit this group at
>>
http://groups.google.com/group/akara-dev?hl=en.