Can't remove line feeds with Saxon 6.5.3

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't remove line feeds with Saxon 6.5.3

Rik Jones
I can't get my code to work to remove line feeds with Saxon 6.5.3

I am using the following code:

normalize-space(translate($Value,'	

',''))

Any ideas would be helpful, I am relatively new to XSLT, and just
started a project with Saxon. I did not pick the Saxon version that was,
trust upon me.





Rik Jones
Internet/Intranet Project manager


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: Can't remove line feeds with Saxon 6.5.3

Michael Kay
I can't see from this sample what you are doing wrong. It would be useful to
post a complex stylesheet or query, cut down to show the essence of the
problem, and explain what output you are getting and what output you
expected. This will then reveal where you are making some incorrect
assumption.

In fact, though, this is probably not a Saxon-specific problem at all, but a
general XSLT coding enquiry. So, rather than asking on a product-specific
list, you should raise your question on the xsl-list at mulberrytech.com

Michael Kay
Saxonica


> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Rik Jones
> Sent: 11 March 2006 18:48
> To: [hidden email]
> Subject: [saxon] Can't remove line feeds with Saxon 6.5.3
>
> I can't get my code to work to remove line feeds with Saxon 6.5.3
>
> I am using the following code:
>
> normalize-space(translate($Value,'	

',''))
>
> Any ideas would be helpful, I am relatively new to XSLT, and just
> started a project with Saxon. I did not pick the Saxon
> version that was,
> trust upon me.
>
>
>
>
>
> Rik Jones
> Internet/Intranet Project manager
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking
> scripting language
> that extends applications into web and mobile media. Attend
> the live webcast
> and join the prime developer group breaking into this new
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&
dat=121642
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: RE: Can't remove line feeds with Saxon 6.5.3

Rik Jones
In reply to this post by Rik Jones
This problem does not occur in my Widows .NET  XSLT parser so I think it may be SAXON specific.
 
Normalize space does not remove line feeds
 
 <xsl:variable name="name" select="@name"/>
 <xsl:variable name="value" select="normalize-space(/Root/Data/DataElement[@name = $name]/Value)" />

 
—------------------
Neither does translate
 
 <xsl:variable name="name" select="@name"/>
 <xsl:variable name="value" select="translate(/Root/Data/DataElement[@name = $name]/Value,'&#x9;&#xa;&#xd;','')"/>
 
So any ideas on how to remove line feeds in SAXON?
 
I am getting frustrated with this.
 
FYI:
I tried SAXON 6.5.5 same problem.
xsl-list at mulberrytech.com recomended using normalize-space(.)

 
 

Message: 1
From: "Michael Kay" <[hidden email]>
To: <[hidden email]>
Subject: RE: [saxon] Can't remove line feeds with Saxon 6.5.3
Date: Sun, 12 Mar 2006 21:19:21 -0000
Reply-To: [hidden email]

I can't see from this sample what you are doing wrong. It would be useful to
post a complex stylesheet or query, cut down to show the essence of the
problem, and explain what output you are getting and what output you
expected. This will then reveal where you are making some incorrect
assumption.

In fact, though, this is probably not a Saxon-specific problem at all, but a
general XSLT coding enquiry. So, rather than asking on a product-specific
list, you should raise your question on the xsl-list at mulberrytech.com

Michael Kay
Saxonica


> -----Original Message-----
> From: [hidden email]
> [[hidden email] On Behalf Of Rik Jones
> Sent: 11 March 2006 18:48
> To: [hidden email]
> Subject: [saxon] Can't remove line feeds with Saxon 6.5.3
>
> I can't get my code to work to remove line feeds with Saxon 6.5.3
>
> I am using the following code:
>
> normalize-space(translate($Value,'&#x9;&#xa;&#xd;',''))
>
> Any ideas would be helpful, I am relatively new to XSLT, and just
> started a project with Saxon. I did not pick the Saxon
> version that was,
> trust upon me.
>
>
>
>
>
> Rik Jones
> Internet/Intranet Project manager
>
 
Rik Jones
Internet/Intranet Project manager
Reply | Threaded
Open this post in threaded view
|

Re: RE: Can't remove line feeds with Saxon 6.5.3

Andrew Welch
On 3/14/06, Rik Jones <[hidden email]> wrote:

>
> This problem does not occur in my Widows .NET  XSLT parser so I think it may
> be SAXON specific.
>
> Normalize space does not remove line feeds
>
>  <xsl:variable name="name" select="@name"/>
>  <xsl:variable name="value"
> select="normalize-space(/Root/Data/DataElement[@name =
> $name]/Value)" />
>
> —------------------
> Neither does translate
>
>  <xsl:variable name="name" select="@name"/>
>  <xsl:variable name="value"
> select="translate(/Root/Data/DataElement[@name =
> $name]/Value,'&#x9;&#xa;&#xd;','')"/>
>
> So any ideas on how to remove line feeds in SAXON?
>
> I am getting frustrated with this.
>
> FYI:
> I tried SAXON 6.5.5 same problem.
> xsl-list at mulberrytech.com recomended using normalize-space(.)

You still haven't provided simple input and output examples, with a
small and concise stylesheet that can replicate the issue.  If the
output is different between the .Net xslt processor and Saxon why not
post examples of both to show the difference?  Which line feeds aren't
being removed?

Having said all that, I wonder if it's the same issue where MSXML
strips whitespace text nodes by default...


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: RE: Can't remove line feeds with Saxon 6.5.3

Hardacker, Andrew
In reply to this post by Rik Jones
I've been using this for a few years:

...select="translate($text,'&#x0D;&#x0A;','')

Maybe the zeroes aren't optional?

Andy Hardacker

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of andrew welch
Sent: Tuesday, March 14, 2006 3:51 PM
To: [hidden email]
Subject: Re: RE: [saxon] Can't remove line feeds with Saxon 6.5.3


On 3/14/06, Rik Jones <[hidden email]> wrote:
>
> This problem does not occur in my Widows .NET  XSLT parser so I think it
may

> be SAXON specific.
>
> Normalize space does not remove line feeds
>
>  <xsl:variable name="name" select="@name"/>
>  <xsl:variable name="value"
> select="normalize-space(/Root/Data/DataElement[@name =
> $name]/Value)" />
>
> —------------------
> Neither does translate
>
>  <xsl:variable name="name" select="@name"/>
>  <xsl:variable name="value"
> select="translate(/Root/Data/DataElement[@name =
> $name]/Value,'&#x9;&#xa;&#xd;','')"/>
>
> So any ideas on how to remove line feeds in SAXON?
>
> I am getting frustrated with this.
>
> FYI:
> I tried SAXON 6.5.5 same problem.
> xsl-list at mulberrytech.com recomended using normalize-space(.)

You still haven't provided simple input and output examples, with a
small and concise stylesheet that can replicate the issue.  If the
output is different between the .Net xslt processor and Saxon why not
post examples of both to show the difference?  Which line feeds aren't
being removed?

Having said all that, I wonder if it's the same issue where MSXML
strips whitespace text nodes by default...


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help



The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: RE: Can't remove line feeds with Saxon 6.5.3

Michael Kay
In reply to this post by Rik Jones
In my previous response I asked you to provide some evidence. The onus is on you to construct an example that shows the input and the incorrect output. I think it's very unlikely that there is a Saxon problem here: I'm prepared to keep an open mind, but I'm not prepared to construct test cases specially for you. Show a source document, a simple stylesheet, and a result document, and it will soon be clear whether you are making some elementary mistake or whether something very strange is happening.
 
Michael Kay


From: [hidden email] [mailto:[hidden email]] On Behalf Of Rik Jones
Sent: 14 March 2006 19:33
To: [hidden email]
Subject: RE: RE: [saxon] Can't remove line feeds with Saxon 6.5.3

This problem does not occur in my Widows .NET  XSLT parser so I think it may be SAXON specific.
 
Normalize space does not remove line feeds
 
 <xsl:variable name="name" select="@name"/>
 <xsl:variable name="value" select="normalize-space(/Root/Data/DataElement[@name = $name]/Value)" />

 
—------------------
Neither does translate
 
 <xsl:variable name="name" select="@name"/>
 <xsl:variable name="value" select="translate(/Root/Data/DataElement[@name = $name]/Value,'&#x9;&#xa;&#xd;','')"/>
 
So any ideas on how to remove line feeds in SAXON?
 
I am getting frustrated with this.
 
FYI:
I tried SAXON 6.5.5 same problem.
xsl-list at mulberrytech.com recomended using normalize-space(.)

 
 

Message: 1
From: "Michael Kay" <[hidden email]>
To: <[hidden email]>
Subject: RE: [saxon] Can't remove line feeds with Saxon 6.5.3
Date: Sun, 12 Mar 2006 21:19:21 -0000
Reply-To: [hidden email]

I can't see from this sample what you are doing wrong. It would be useful to
post a complex stylesheet or query, cut down to show the essence of the
problem, and explain what output you are getting and what output you
expected. This will then reveal where you are making some incorrect
assumption.

In fact, though, this is probably not a Saxon-specific problem at all, but a
general XSLT coding enquiry. So, rather than asking on a product-specific
list, you should raise your question on the xsl-list at mulberrytech.com

Michael Kay
Saxonica


> -----Original Message-----
> From: [hidden email]
> [[hidden email] On Behalf Of Rik Jones
> Sent: 11 March 2006 18:48
> To: [hidden email]
> Subject: [saxon] Can't remove line feeds with Saxon 6.5.3
>
> I can't get my code to work to remove line feeds with Saxon 6.5.3
>
> I am using the following code:
>
> normalize-space(translate($Value,'&#x9;&#xa;&#xd;',''))
>
> Any ideas would be helpful, I am relatively new to XSLT, and just
> started a project with Saxon. I did not pick the Saxon
> version that was,
> trust upon me.
>
>
>
>
>
> Rik Jones
> Internet/Intranet Project manager
>
 
Rik Jones
Internet/Intranet Project manager
Reply | Threaded
Open this post in threaded view
|

RE: RE: Can't remove line feeds with Saxon 6.5.3

Michael Kay
In reply to this post by Hardacker, Andrew
> I've been using this for a few years:
>
> ...select="translate($text,'&#x0D;&#x0A;','')
>
> Maybe the zeroes aren't optional?

The leading zeroes are optional.

Michael Kay




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help