First, a thank youz to Jarno, his code worked.

I managed to figure out I needed to add number()
so that October (10) did not come out as January.

----

Jeni Tennison's code worked too.

XSLT Goddess Jeni Tennison emailed me: [updated for my XML DB]
>
>    [Kay's pg 95 code], as it describes, that code will only work if you're
>    using XSLT 1.1 (or XSLT 2.0 actually) because it silently converts a
>    result tree fragment into a node tree. You will have to use an
>    extension node-set() function, e.g.:
>
>    <xsl:variable name="months-rtf">
>      <January/><February/><March/><April/><May/><June/><July/>
>      <August/><September/><October/><November/><December/>
>    </xsl:variable>
>    <xsl:variable name="months" select="xalan:nodeset($months-rtf)/*" />
>
>    <xsl:template match="Product/ProductStatus">
>
>      <xsl:variable name="mm"    select="substring(@statusDateTime,6,2)" />
>      <xsl:value-of select="name($months[position()=$mm])"/>
>      <xsl:text> </xsl:text>
>      <xsl:value-of select="number(substring(@statusDateTime,9,2))"/>
>      <xsl:text>, </xsl:text>
>      <xsl:value-of select="substring(@statusDateTime, 1, 4)"/>
>
>    </xsl:template>

Result: October 18, 2002

----

I've posted my thesis that FOP error message reporting
should not use dump tracebacks.

Now I'd like to say:

   Please upgrade the Xalan in FOP to be the latest,
   because it includes EXSLT. 

   Not having EXSLT available during a FOP is like
   not having CPAN available for PERL. Wheel... 

   http://xml.apache.org/xalan-j/index.html
   #
   #   Xalan-Java version 2.4.0 also introduces
   #   support for EXSLT extensions.

Although I am running FOP from the command-line during
development, production use is on the TomCat server I
setup. That uses FopServlet.java to run the FOP.

I don't know Java to rewrite FopServlet to run a new
Xalan (to have EXSLT) then a pure FOP, and so far the
only recommendation from this list on plugging a new
Xalan into FOP is "Don't go there."

As for EXSLT, the sooner it's in FOP the better.
It's going to happen anyway, right? How about now?

(Java style) Regular expressions, etc., in EXSLT.
Not to mention the 1-12 month name conversion.
Common tasks, needed again and again.

We're not writing books here, but processing financial
reports on companies into PDFs of several pages from
an XML delivery from the clients.

EXSLT.org
#
#    Modules
#
#        Dates and Times
#
#        Dynamic
#
#        Common
#
#        Functions
#
#        Math
#
#        Regular Expressions
#
#        Sets
#
#        Strings

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to