Michael ,
 
Thanks for the response ,  I tried same with Saxon 9.0.0.2  command line , It works fine .
issue with Stylus studio ,
thanks again for the clarification and help
 
Regards
Brijesh N K

On Tue, Nov 3, 2009 at 5:18 PM, Michael Kay <mike@saxonica.com> wrote:

Sorry, I still can't reproduce this. I've tried from the command line with
Saxon 8.9.0.3, and I've tried from a version of Stylus Studio that is
running Saxon 9.0.0.2, and both produce correct output.

If you can reproduce this outside the Stylus environment, please let me know
how. If you can't, you may have to direct the problem to the Stylus Studio
support team.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay


> -----Original Message-----
> From: brijesh [mailto:brijeshnk@gmail.com]
> Sent: 03 November 2009 11:17
> To: saxon-help@lists.sourceforge.net
> Subject: Re: [saxon] not able to reassing value to
> saxon:assignable variables
>
>
> Michael ,
>
> thanks for the response ,
>
> I have trimmed down the xslt only for testing this issue,
> still getting the same document without namespace defenition.
> below is my xslt
>
> <?xml version="1.0" encoding="utf-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                 xmlns:com="com.ekaplus.commons.document"
>
>                 exclude-result-prefixes="com" version="1.0">
>
>
>
>     <xsl:template name="main" match="/">
>
>         <xsl:variable name="err_doc" >
>
>
>             <xsl:element name="GenericDocument"
> namespace="com.ekaplus.commons.document">
>                 <xsl:attribute name="document_Id">
>                     <xsl:value-of select="'ERROR_DOC'"/>
>                 </xsl:attribute>
>
>                 <xsl:attribute name="description">
>                     <xsl:value-of select="'Error document
> after validation'"/>
>                 </xsl:attribute>
>
>
>                 <xsl:attribute name="name">
>                     <xsl:value-of select="'Error response document'"/>
>                 </xsl:attribute>
>                 <xsl:attribute name="created_date">
>                     <xsl:value-of select="'2009-10-26'"/>
>                 </xsl:attribute>
>                 <xsl:element name="PropertyData" >
>
>                     <xsl:element name="PropertyData" >
>
>                         <xsl:attribute name="pkey">
>                             <xsl:value-of select="'Status'"/>
>                         </xsl:attribute>
>                         <xsl:attribute name="pvalue">
>                             <xsl:value-of select="'FAILED'"/>
>                         </xsl:attribute>
>
>
>                     </xsl:element>
>                 </xsl:element>
>             </xsl:element>
>         </xsl:variable>
>
>         <xsl:copy-of select="$err_doc"/>
>         </xsl:template
> >
> </xsl:stylesheet>
>
> when i run above xslt , output document apprears as follows ,
> which is not well formed ,
>
> <com:GenericDocument document_Id="ERROR_DOC"
> description="Error document after validation" name="Error
> response document"
> created_date="2009-10-26"><PropertyData><PropertyData pkey="Status"
> pvalue="FAILED"/></PropertyData></com:GenericDocument>
> don't know if i am making any mistake in stylesheet, please
> advice me.
>
> I use Saxon 8.9.03 with Stylus studio IDE prefession version
> , Java version is java version "1.5.0_07"
>
> Regards
>
>
>
> brijesh wrote:
> >
> > Hi there,
> >
> > style sheet  as below,
> >
> >
> > <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >     xmlns:sql="java:/net.sf.saxon.sql.SQLElementFactory"
> >     xmlns:java="http://saxon.sf.net/java-type"
> >     xmlns:saxon="http://saxon.sf.net/"
> extension-element-prefixes="saxon"
> >     exclude-result-prefixes="java" version="1.0">
> >
> >     <xsl:variable name="count" select="0" saxon:assignable="yes" />
> >
> >     <xsl:template name="main" match="/">
> >
> >
> >             <xsl:variable name="err_doc">
> >                     <xsl:call-template name="validate_doc" />
> >             </xsl:variable>
> >
> >
> >             <!--<xsl:call-template name="validate_doc" /> -->
> >
> >             <test>
> >                     <xsl:copy-of select="$count" />
> >             </test>
> >
> >     </xsl:template>
> >
> >     <xsl:template name="validate_doc">
> >             <saxon:assign name="count" select="$count+1" />
> >
> >             <xsl:call-template name="applyTemplateForError" />
> >     </xsl:template>
> >
> >     <xsl:template name="applyTemplateForError">
> >             <saxon:assign name="count" select="$count+1" />
> >     </xsl:template>
> > </xsl:stylesheet>
> >
> > When i execute i get the following result count value as 0.
> Where as i
> > am expecting count value as 2.
> >
> > <test xmlns:sql="java:/net.sf.saxon.sql.SQLElementFactory">0</test>
> >
> > count variable is global, hence the value should be 2,
> >
> > What am i doing wrong here? , instead of
> >
> > <xsl:variable name="err_doc">
> >                     <xsl:call-template name="validate_doc" />
> >             </xsl:variable>
> >
> > if I execute
> >
> > <xsl:call-template name="validate_doc" /> ,
> >
> > It works fine , Any input on this?
> >
> >
> >
> >
> > Regards
> >
> > Brijesh N K
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/not-able-to-reassing-value-to-saxon%3Aas
> signable-variables-tp26128538p26160067.html
> Sent from the saxon-help mailing list archive at Nabble.com.
>
>
> --------------------------------------------------------------
> ----------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year.
> Jumpstart your
> developing skills, take BlackBerry mobile applications to
> market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> saxon-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/saxon-help