Hi,

I want to unsubscribe from this group. Please suggest.

Thanks,
Khaleek Ahmad


From: "saxon-help-request@lists.sourceforge.net" <saxon-help-request@lists.sourceforge.net>
To: saxon-help@lists.sourceforge.net
Sent: Mon, September 6, 2010 2:44:45 PM
Subject: saxon-help Digest, Vol 52, Issue 6

Send saxon-help mailing list submissions to
    saxon-help@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.sourceforge.net/lists/listinfo/saxon-help
or, via email, send a message with subject or body 'help' to
    saxon-help-request@lists.sourceforge.net

You can reach the person managing the list at
    saxon-help-owner@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of saxon-help digest..."


Today's Topics:

  1. Re: Extension function for splitting a string (Florent Georges)
  2. Re: Extension function for splitting a string (Michael Kay)
  3. Re: Extension function for splitting a string
      (Meeraj Kunnumpurath)
  4. XSL FO (Sanjay Pant)


----------------------------------------------------------------------

Message: 1
Date: Sun, 5 Sep 2010 15:10:28 +0000 (GMT)
From: Florent Georges <lists@fgeorges.org>
Subject: Re: [saxon] Extension function for splitting a string
To: Mailing list for the SAXON XSLT and XQuery processor
    <saxon-help@lists.sourceforge.net>,     Meeraj Kunnumpurath
    <mkunnumpurath@googlemail.com>
Message-ID: <907320.58532.qm@web29518.mail.ird.yahoo.com>
Content-Type: text/plain; charset=utf-8

Meeraj Kunnumpurath wrote:

> I have written one myself, assuming there is not one available
> in the core functions.

  That's more or less how I would do it, except I would merge
both conditional branches into one:

  <xsl:function name="gpg:split">
    <xsl:param name="line"        as="xs:string"/>
    <xsl:param name="line-size"    as="xs:integer"/>
    <xsl:param name="current-line" as="xs:integer"/>
    <xsl:param name="max-lines"    as="xs:integer"/>
    <xsl:if test="$line and $current-line lt $max-lines">
      <!-- output the line -->
      <xsl:value-of select="substring($line, 0, $line-size + 1)"/>
      <xsl:text> </xsl:text>
      <!-- recurse on the next line -->
      <xsl:variable name="new-line" select="
          substring($line, $line-size + 1, string-length($line))"/>
      <xsl:value-of select="
          gpg:split($new-line, $line-size, $current-line + 1, $max-lines)"/>
    </xsl:if>
  </xsl:function>

  I would maybe rather return a sequence of strings in order to
have a more generic tool, rather than directly building text
nodes, and maybe maintain a current index instead of recursing on
a substring, if my profiler tells me that's necessary.

  But basically that's the approach I would take.

  Regards,

--
Florent Georges
http://fgeorges.org/



     



------------------------------

Message: 2
Date: Sun, 05 Sep 2010 22:22:31 +0100
From: Michael Kay <mike@saxonica.com>
Subject: Re: [saxon] Extension function for splitting a string
To: saxon-help@lists.sourceforge.net
Message-ID: <4C840A17.3080403@saxonica.com>
Content-Type: text/plain; charset="iso-8859-1"

  An alternative approach you might like to consider is along the lines of:

<xsl:for-each-group select="string-to-codepoints($line)"
group-adjacent="position() idiv $line-size">
<line><xsl:value-of select="codepoints-to-string(current-group())"/></line>
</xsl:for-each>

Michael Kay
Saxonica

On 05/09/2010 3:35 PM, Meeraj Kunnumpurath wrote:
> Hi,
>
> I have written one myself, assuming there is not one available in the
> core functions.
>
> <xsl:function name="gpg:split">
> <xsl:param name="line" />
> <xsl:param name="line-size" />
> <xsl:param name="current-line" />
> <xsl:param name="max-lines" />
> <xsl:if test="string-length($line) &lt;= $line-size and $current-line
> &lt; $max-lines">
> <xsl:value-of select="$line" />
> <xsl:text> </xsl:text>
> </xsl:if>
> <xsl:if test="string-length($line) > $line-size and $current-line &lt;
> $max-lines">
> <xsl:value-of select="substring($line, 0, $line-size + 1)" />
> <xsl:text> </xsl:text>
> <xsl:value-of select="gpg:split(substring($line, $line-size + 1,
> string-length($line)), $line-size, $current-line + 1, $max-lines)" />
> </xsl:if>
> </xsl:function>
>
> Thanks
> Meeraj
>
> On Sun, Sep 5, 2010 at 3:24 PM, Florent Georges <lists@fgeorges.org
> <mailto:lists@fgeorges.org>> wrote:
>
>    Meeraj Kunnumpurath wrote:
>
>      Hi,
>
>    > Is there an extension function to split a line based on number
>    > of characters up to a specified number of lines?
>
>      Why do you want an extension function for that?
>
>      Regards,
>
>    --
>    Florent Georges
>    http://fgeorges.org/
>
>
>
>
>
>    ------------------------------------------------------------------------------
>    This SF.net Dev2Dev email is sponsored by:
>
>    Show off your parallel programming skills.
>    Enter the Intel(R) Threading Challenge 2010.
>    http://p.sf.net/sfu/intel-thread-sfd
>    _______________________________________________
>    saxon-help mailing list archived at http://saxon.markmail.org/
>    saxon-help@lists.sourceforge.net
>    <mailto:saxon-help@lists.sourceforge.net>
>    https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
>
>
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> saxon-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/saxon-help

-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 3
Date: Mon, 6 Sep 2010 10:01:30 +0100
From: Meeraj Kunnumpurath <mkunnumpurath@googlemail.com>
Subject: Re: [saxon] Extension function for splitting a string
To: Mailing list for the SAXON XSLT and XQuery processor
    <saxon-help@lists.sourceforge.net>
Message-ID: <-1258037638308101120@unknownmsgid>
Content-Type: text/plain; charset="iso-8859-1"

Thanks Michael, that is quite concise.

Sent from my iPhone

On 5 Sep 2010, at 22:22, Michael Kay <mike@saxonica.com> wrote:

An alternative approach you might like to consider is along the lines of:

<xsl:for-each-group select="string-to-codepoints($line)"
group-adjacent="position() idiv $line-size">
  <line><xsl:value-of
select="codepoints-to-string(current-group())"/></line>
</xsl:for-each>

Michael Kay
Saxonica

On 05/09/2010 3:35 PM, Meeraj Kunnumpurath wrote:

Hi,

I have written one myself, assuming there is not one available in the core
functions.

    <xsl:function name="gpg:split">
        <xsl:param name="line" />
        <xsl:param name="line-size" />
        <xsl:param name="current-line" />
        <xsl:param name="max-lines" />
        <xsl:if test="string-length($line) &lt;= $line-size and
$current-line &lt; $max-lines">
            <xsl:value-of select="$line" />
            <xsl:text> </xsl:text>
        </xsl:if>
        <xsl:if test="string-length($line) > $line-size and $current-line
&lt; $max-lines">
            <xsl:value-of select="substring($line, 0, $line-size + 1)" />
            <xsl:text> </xsl:text>
            <xsl:value-of select="gpg:split(substring($line, $line-size + 1,
string-length($line)), $line-size, $current-line + 1, $max-lines)" />
        </xsl:if>
    </xsl:function>

Thanks
Meeraj

On Sun, Sep 5, 2010 at 3:24 PM, Florent Georges <lists@fgeorges.org> wrote:

> Meeraj Kunnumpurath wrote:
>
>  Hi,
>
> > Is there an extension function to split a line based on number
> > of characters up to a specified number of lines?
>
>  Why do you want an extension function for that?
>
>  Regards,
>
> --
> Florent Georges
> http://fgeorges.org/
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> saxon-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.http://p.sf.net/sfu/intel-thread-sfd


_______________________________________________
saxon-help mailing list archived at
http://saxon.markmail.org/saxon-help@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 4
Date: Mon, 6 Sep 2010 12:45:40 +0530
From: "Sanjay Pant" <sanjayp@metadesignsolutions.com>
Subject: [saxon] XSL FO
To: <saxon-help@lists.sourceforge.net>
Message-ID: <33789C80B385462E9B582F25F5D6B989@userfeead34f94>
Content-Type: text/plain; charset="iso-8859-1"

Hi All,
 
    I am new to Saxon Xslt, I would like to know if Saxon support XSL:FO.
I had C#.net windows service that process one xml  to another, but now I need to Upgrade it to xsl2.0.
I need to add support for XSL:FO as well, so I am looking for xsl parser, that support xslt2.0 and XSL:FO  as well.
So if anyone have any info regarding XSL:FO support in saxon, please help me. If possible please provide me some sample for using XSL:FO .

Thanks
Sanjay Pant
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd

------------------------------

_______________________________________________
saxon-help mailing list
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help
The saxon-help list is archived at http://saxon.markmail.org/

End of saxon-help Digest, Vol 52, Issue 6
*****************************************