How to run XSLT 2.0 in BaseX
Wednesday, 21 June 2017 · 10 messages
DS
Dharmendra Singh21 Jun 2017 11:19 #
Hi all i am trying to run XSLT 2.0 but it is giving the error when i run xslt 1.0 it fine but i am not able to run XSLT 2.0, is there any way to run XSLT 2.0, below is my code.
let $xslt :=
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
<xsl:variable name="editmode" select="dharam"/>
<xsl:variable name="EDIT-FULL" select="dharam"/>
<xsl:template match="/">
<xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' else 'ouput'"/>
</xsl:template>
</xsl:stylesheet>return
xslt:transform(<p>1111</p>, $xslt)Regards
Dharmendra Kumar Singh
CG
Christian Grün21 Jun 2017 11:24 #
Did you check out the documentation (http://docs.basex.org/wiki/XSLT_Module)?
Quoted text · Dharmendra Singh · 28 lines
On Wed, Jun 21, 2017 at 11:19 AM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > Hi all i am trying to run XSLT 2.0 but it is giving the error when i run > xslt 1.0 it fine but i am not able to run XSLT 2.0, is there any way to run > XSLT 2.0, below is my code. > > > > let $xslt := > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" > version="2.0"> > <xsl:variable name="editmode" select="dharam"/> > <xsl:variable name="EDIT-FULL" select="dharam"/> > <xsl:template match="/"> > <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' > else 'ouput'"/> > </xsl:template> > </xsl:stylesheet> > > return > > xslt:transform(<p>1111</p>, $xslt) > > > > Regards > Dharmendra Kumar Singh
DS
Dharmendra Singh21 Jun 2017 11:45 #
Yes the example which has been given for the 2.0 running perfect but when i am adding the line "if($editmode eq $EDIT-FULL) then 'textarea' else 'ouput' in my example it is giving error: [bxerr:BXSL0001] ERROR: 'Syntax error in 'if($editmode eq $EDIT-FULL) then 'textarea' else 'ouput''.'FATAL ERROR: ': line 1: Required attribute 'select' is missing.' and same code running on my oxygen editor.
RegardsDharmendra Kumar Singh
Quoted text · Christian Grün · 1 line
On Wednesday, 21 June 2017 2:54 PM, Christian Grün <christian.gruen at gmail.com> wrote:
Did you check out the documentation (http://docs.basex.org/wiki/XSLT_Module)?
Quoted text · Dharmendra Singh · 28 lines
On Wed, Jun 21, 2017 at 11:19 AM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > Hi all i am trying to run XSLT 2.0 but it is giving the error when i run > xslt 1.0 it fine but i am not able to run XSLT 2.0, is there any way to run > XSLT 2.0, below is my code. > > > > let $xslt := > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" > version="2.0"> > <xsl:variable name="editmode" select="dharam"/> > <xsl:variable name="EDIT-FULL" select="dharam"/> > <xsl:template match="/"> > <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' > else 'ouput'"/> > </xsl:template> > </xsl:stylesheet> > > return > > xslt:transform(<p>1111</p>, $xslt) > > > > Regards > Dharmendra Kumar Singh
CG
Christian Grün21 Jun 2017 11:50 #
So Saxon is included in your classpath, and
xslt:version() returns 2.0? In that case, you’ll obviously need to check your XSLT
expression.Quoted text · Dharmendra Singh · 56 lines
On Wed, Jun 21, 2017 at 11:45 AM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > Yes the example which has been given for the 2.0 running perfect but when i > am adding the line "if($editmode eq $EDIT-FULL) then 'textarea' else 'ouput' > in my example it is giving error: > > [bxerr:BXSL0001] ERROR: 'Syntax error in 'if($editmode eq $EDIT-FULL) then > 'textarea' else 'ouput''.' > FATAL ERROR: ': line 1: Required attribute 'select' is missing.' > > and same code running on my oxygen editor. > > > Regards > Dharmendra Kumar Singh > > > On Wednesday, 21 June 2017 2:54 PM, Christian Grün > <christian.gruen at gmail.com> wrote: > > > Did you check out the documentation > (http://docs.basex.org/wiki/XSLT_Module)? > > > On Wed, Jun 21, 2017 at 11:19 AM, Dharmendra Singh > <dharam.mahi at gmail.com> wrote: >> Hi all i am trying to run XSLT 2.0 but it is giving the error when i run >> xslt 1.0 it fine but i am not able to run XSLT 2.0, is there any way to >> run >> XSLT 2.0, below is my code. >> >> >> >> let $xslt := >> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" >> version="2.0"> >> <xsl:variable name="editmode" select="dharam"/> >> <xsl:variable name="EDIT-FULL" select="dharam"/> >> <xsl:template match="/"> >> <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' >> else 'ouput'"/> >> </xsl:template> >> </xsl:stylesheet> >> >> return >> >> xslt:transform(<p>1111</p>, $xslt) >> >> >> >> Regards >> Dharmendra Kumar Singh > >
DS
Dharmendra Singh21 Jun 2017 12:09 #
xslt:version() returning 1.0 and my XSLT expression for the 2.0 like <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' else 'ouput'"/> as per xslt 2.0 expression is right so can you please tell me what should i do.
RegardsDharmendra kumar singhQuoted text · Christian Grün · 1 line
On Wednesday, 21 June 2017 3:20 PM, Christian Grün <christian.gruen at gmail.com> wrote:
So Saxon is included in your classpath, and
xslt:version() returns 2.0? In that case, you’ll obviously need to check your XSLT
expression.Quoted text · Dharmendra Singh · 56 lines
On Wed, Jun 21, 2017 at 11:45 AM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > Yes the example which has been given for the 2.0 running perfect but when i > am adding the line "if($editmode eq $EDIT-FULL) then 'textarea' else 'ouput' > in my example it is giving error: > > [bxerr:BXSL0001] ERROR: 'Syntax error in 'if($editmode eq $EDIT-FULL) then > 'textarea' else 'ouput''.' > FATAL ERROR: ': line 1: Required attribute 'select' is missing.' > > and same code running on my oxygen editor. > > > Regards > Dharmendra Kumar Singh > > > On Wednesday, 21 June 2017 2:54 PM, Christian Grün > <christian.gruen at gmail.com> wrote: > > > Did you check out the documentation > (http://docs.basex.org/wiki/XSLT_Module)? > > > On Wed, Jun 21, 2017 at 11:19 AM, Dharmendra Singh > <dharam.mahi at gmail.com> wrote: >> Hi all i am trying to run XSLT 2.0 but it is giving the error when i run >> xslt 1.0 it fine but i am not able to run XSLT 2.0, is there any way to >> run >> XSLT 2.0, below is my code. >> >> >> >> let $xslt := >> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" >> version="2.0"> >> <xsl:variable name="editmode" select="dharam"/> >> <xsl:variable name="EDIT-FULL" select="dharam"/> >> <xsl:template match="/"> >> <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' >> else 'ouput'"/> >> </xsl:template> >> </xsl:stylesheet> >> >> return >> >> xslt:transform(<p>1111</p>, $xslt) >> >> >> >> Regards >> Dharmendra Kumar Singh > >
CG
Christian Grün21 Jun 2017 12:12 #
Quoted text · Dharmendra Singh · 1 line
> so can you please tell me what should i do.
Sure: Read the documentation and find out why
xslt:version() returns 1.0. ;)Quoted text · Dharmendra Singh · 84 lines
On Wed, Jun 21, 2017 at 12:09 PM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > xslt:version() returning 1.0 and my XSLT expression for the 2.0 like > <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' else > 'ouput'"/> > > as per xslt 2.0 expression is right so can you please tell me what should i > do. > > > Regards > Dharmendra kumar singh > > > On Wednesday, 21 June 2017 3:20 PM, Christian Grün > <christian.gruen at gmail.com> wrote: > > > So Saxon is included in your classpath, and xslt:version() returns > 2.0? In that case, you’ll obviously need to check your XSLT > expression. > > > On Wed, Jun 21, 2017 at 11:45 AM, Dharmendra Singh > <dharam.mahi at gmail.com> wrote: >> Yes the example which has been given for the 2.0 running perfect but when >> i >> am adding the line "if($editmode eq $EDIT-FULL) then 'textarea' else >> 'ouput' >> in my example it is giving error: >> >> [bxerr:BXSL0001] ERROR: 'Syntax error in 'if($editmode eq $EDIT-FULL) >> then >> 'textarea' else 'ouput''.' >> FATAL ERROR: ': line 1: Required attribute 'select' is missing.' >> >> and same code running on my oxygen editor. >> >> >> Regards >> Dharmendra Kumar Singh >> >> >> On Wednesday, 21 June 2017 2:54 PM, Christian Grün >> <christian.gruen at gmail.com> wrote: >> >> >> Did you check out the documentation >> (http://docs.basex.org/wiki/XSLT_Module)? >> >> >> On Wed, Jun 21, 2017 at 11:19 AM, Dharmendra Singh >> <dharam.mahi at gmail.com> wrote: >>> Hi all i am trying to run XSLT 2.0 but it is giving the error when i run >>> xslt 1.0 it fine but i am not able to run XSLT 2.0, is there any way to >>> run >>> XSLT 2.0, below is my code. >>> >>> >>> >>> let $xslt := >>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>> xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" >>> version="2.0"> >>> <xsl:variable name="editmode" select="dharam"/> >>> <xsl:variable name="EDIT-FULL" select="dharam"/> >>> <xsl:template match="/"> >>> <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' >>> else 'ouput'"/> >>> </xsl:template> >>> </xsl:stylesheet> >>> >>> return >>> >>> xslt:transform(<p>1111</p>, $xslt) >>> >>> >>> >>> Regards >>> Dharmendra Kumar Singh >> >> > >
DS
Dharmendra Singh21 Jun 2017 12:40 #
As per documentation By default, this module uses Java’s XSLT 1.0, so if use 2.0 we need to add saxon9he.jar in the classpath RegardsDharmendra Kumar singh
Quoted text · Christian Grün · 2 lines
On Wednesday, 21 June 2017 3:43 PM, Christian Grün <christian.gruen at gmail.com> wrote: > so can you please tell me what should i do.
Sure: Read the documentation and find out why
xslt:version() returns 1.0. ;)Quoted text · Dharmendra Singh · 84 lines
On Wed, Jun 21, 2017 at 12:09 PM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > xslt:version() returning 1.0 and my XSLT expression for the 2.0 like > <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' else > 'ouput'"/> > > as per xslt 2.0 expression is right so can you please tell me what should i > do. > > > Regards > Dharmendra kumar singh > > > On Wednesday, 21 June 2017 3:20 PM, Christian Grün > <christian.gruen at gmail.com> wrote: > > > So Saxon is included in your classpath, and xslt:version() returns > 2.0? In that case, you’ll obviously need to check your XSLT > expression. > > > On Wed, Jun 21, 2017 at 11:45 AM, Dharmendra Singh > <dharam.mahi at gmail.com> wrote: >> Yes the example which has been given for the 2.0 running perfect but when >> i >> am adding the line "if($editmode eq $EDIT-FULL) then 'textarea' else >> 'ouput' >> in my example it is giving error: >> >> [bxerr:BXSL0001] ERROR: 'Syntax error in 'if($editmode eq $EDIT-FULL) >> then >> 'textarea' else 'ouput''.' >> FATAL ERROR: ': line 1: Required attribute 'select' is missing.' >> >> and same code running on my oxygen editor. >> >> >> Regards >> Dharmendra Kumar Singh >> >> >> On Wednesday, 21 June 2017 2:54 PM, Christian Grün >> <christian.gruen at gmail.com> wrote: >> >> >> Did you check out the documentation >> (http://docs.basex.org/wiki/XSLT_Module)? >> >> >> On Wed, Jun 21, 2017 at 11:19 AM, Dharmendra Singh >> <dharam.mahi at gmail.com> wrote: >>> Hi all i am trying to run XSLT 2.0 but it is giving the error when i run >>> xslt 1.0 it fine but i am not able to run XSLT 2.0, is there any way to >>> run >>> XSLT 2.0, below is my code. >>> >>> >>> >>> let $xslt := >>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>> xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" >>> version="2.0"> >>> <xsl:variable name="editmode" select="dharam"/> >>> <xsl:variable name="EDIT-FULL" select="dharam"/> >>> <xsl:template match="/"> >>> <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' >>> else 'ouput'"/> >>> </xsl:template> >>> </xsl:stylesheet> >>> >>> return >>> >>> xslt:transform(<p>1111</p>, $xslt) >>> >>> >>> >>> Regards >>> Dharmendra Kumar Singh >> >> > >
DS
Dharmendra Singh21 Jun 2017 13:25 #
Hi Christian,
As i have checked by running function
xslt:processor() it is using java now , so how can i use the saxon9ee.jar for the XSLT 2.0 can you describe the process. right now i am trying to set the path of the saxon9ee.jar environment variable/path
C:\Users\dharmendra.singh\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\dharmendra.singh\AppData\Local\Programs\Python\Python36\;C:\Users\dharmendra.singh\AppData\Local\Apps\cURL\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\dharmendra.singh\AppData\Roaming\npm,D:\Software\SaxonEE9-8-0-1J\saxon9he.jar
but it is not workingQuoted text · Dharmendra Singh · 1 line
On Wednesday, 21 June 2017 4:10 PM, Dharmendra Singh <dharam.mahi at gmail.com> wrote:
As per documentation By default, this module uses Java’s XSLT 1.0, so if use 2.0 we need to add saxon9he.jar in the classpath RegardsDharmendra Kumar singh
Quoted text · Christian Grün · 2 lines
On Wednesday, 21 June 2017 3:43 PM, Christian Grün <christian.gruen at gmail.com> wrote: > so can you please tell me what should i do.
Sure: Read the documentation and find out why
xslt:version() returns 1.0. ;)Quoted text · Dharmendra Singh · 84 lines
On Wed, Jun 21, 2017 at 12:09 PM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > xslt:version() returning 1.0 and my XSLT expression for the 2.0 like > <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' else > 'ouput'"/> > > as per xslt 2.0 expression is right so can you please tell me what should i > do. > > > Regards > Dharmendra kumar singh > > > On Wednesday, 21 June 2017 3:20 PM, Christian Grün > <christian.gruen at gmail.com> wrote: > > > So Saxon is included in your classpath, and xslt:version() returns > 2.0? In that case, you’ll obviously need to check your XSLT > expression. > > > On Wed, Jun 21, 2017 at 11:45 AM, Dharmendra Singh > <dharam.mahi at gmail.com> wrote: >> Yes the example which has been given for the 2.0 running perfect but when >> i >> am adding the line "if($editmode eq $EDIT-FULL) then 'textarea' else >> 'ouput' >> in my example it is giving error: >> >> [bxerr:BXSL0001] ERROR: 'Syntax error in 'if($editmode eq $EDIT-FULL) >> then >> 'textarea' else 'ouput''.' >> FATAL ERROR: ': line 1: Required attribute 'select' is missing.' >> >> and same code running on my oxygen editor. >> >> >> Regards >> Dharmendra Kumar Singh >> >> >> On Wednesday, 21 June 2017 2:54 PM, Christian Grün >> <christian.gruen at gmail.com> wrote: >> >> >> Did you check out the documentation >> (http://docs.basex.org/wiki/XSLT_Module)? >> >> >> On Wed, Jun 21, 2017 at 11:19 AM, Dharmendra Singh >> <dharam.mahi at gmail.com> wrote: >>> Hi all i am trying to run XSLT 2.0 but it is giving the error when i run >>> xslt 1.0 it fine but i am not able to run XSLT 2.0, is there any way to >>> run >>> XSLT 2.0, below is my code. >>> >>> >>> >>> let $xslt := >>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>> xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" >>> version="2.0"> >>> <xsl:variable name="editmode" select="dharam"/> >>> <xsl:variable name="EDIT-FULL" select="dharam"/> >>> <xsl:template match="/"> >>> <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' >>> else 'ouput'"/> >>> </xsl:template> >>> </xsl:stylesheet> >>> >>> return >>> >>> xslt:transform(<p>1111</p>, $xslt) >>> >>> >>> >>> Regards >>> Dharmendra Kumar Singh >> >> > >
CG
Christian Grün21 Jun 2017 14:00 #
Quoted text · Dharmendra Singh · 2 lines
> right now i am trying to set the path of the saxon9ee.jar > environment variable/path
Saxon needs to be specified in the Java classpath. How do you start BaseX?
Quoted text · Dharmendra Singh · 126 lines
On Wed, Jun 21, 2017 at 1:25 PM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > Hi Christian, > > As i have checked by running function xslt:processor() it is using java now > , so how can i use the saxon9ee.jar for the XSLT 2.0 can you describe the > process. > > > C:\Users\dharmendra.singh\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\dharmendra.singh\AppData\Local\Programs\Python\Python36\;C:\Users\dharmendra.singh\AppData\Local\Apps\cURL\bin;C:\Program > Files (x86)\Microsoft VS > Code\bin;C:\Users\dharmendra.singh\AppData\Roaming\npm,D:\Software\SaxonEE9-8-0-1J\saxon9he.jar > > but it is not working > > > > > On Wednesday, 21 June 2017 4:10 PM, Dharmendra Singh <dharam.mahi at gmail.com> > wrote: > > > As per documentation By default, this module uses Java’s XSLT 1.0, so if use > 2.0 we need to add saxon9he.jar in the classpath > > Regards > Dharmendra Kumar singh > > > On Wednesday, 21 June 2017 3:43 PM, Christian Grün > <christian.gruen at gmail.com> wrote: > > >> so can you please tell me what should i do. > > Sure: Read the documentation and find out why xslt:version() returns 1.0. ;) > > > On Wed, Jun 21, 2017 at 12:09 PM, Dharmendra Singh > <dharam.mahi at gmail.com> wrote: >> xslt:version() returning 1.0 and my XSLT expression for the 2.0 like >> <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' else >> 'ouput'"/> >> >> as per xslt 2.0 expression is right so can you please tell me what should >> i >> do. >> >> >> Regards >> Dharmendra kumar singh >> >> >> On Wednesday, 21 June 2017 3:20 PM, Christian Grün >> <christian.gruen at gmail.com> wrote: >> >> >> So Saxon is included in your classpath, and xslt:version() returns >> 2.0? In that case, you’ll obviously need to check your XSLT >> expression. >> >> >> On Wed, Jun 21, 2017 at 11:45 AM, Dharmendra Singh >> <dharam.mahi at gmail.com> wrote: >>> Yes the example which has been given for the 2.0 running perfect but when >>> i >>> am adding the line "if($editmode eq $EDIT-FULL) then 'textarea' else >>> 'ouput' >>> in my example it is giving error: >>> >>> [bxerr:BXSL0001] ERROR: 'Syntax error in 'if($editmode eq $EDIT-FULL) >>> then >>> 'textarea' else 'ouput''.' >>> FATAL ERROR: ': line 1: Required attribute 'select' is missing.' >>> >>> and same code running on my oxygen editor. >>> >>> >>> Regards >>> Dharmendra Kumar Singh >>> >>> >>> On Wednesday, 21 June 2017 2:54 PM, Christian Grün >>> <christian.gruen at gmail.com> wrote: >>> >>> >>> Did you check out the documentation >>> (http://docs.basex.org/wiki/XSLT_Module)? >>> >>> >>> On Wed, Jun 21, 2017 at 11:19 AM, Dharmendra Singh >>> <dharam.mahi at gmail.com> wrote: >>>> Hi all i am trying to run XSLT 2.0 but it is giving the error when i run >>>> xslt 1.0 it fine but i am not able to run XSLT 2.0, is there any way to >>>> run >>>> XSLT 2.0, below is my code. >>>> >>>> >>>> >>>> let $xslt := >>>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>> xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" >>>> version="2.0"> >>>> <xsl:variable name="editmode" select="dharam"/> >>>> <xsl:variable name="EDIT-FULL" select="dharam"/> >>>> <xsl:template match="/"> >>>> <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' >>>> else 'ouput'"/> >>>> </xsl:template> >>>> </xsl:stylesheet> >>>> >>>> return >>>> >>>> xslt:transform(<p>1111</p>, $xslt) >>>> >>>> >>>> >>>> Regards >>>> Dharmendra Kumar Singh >>> >>> >> >> > > > >
DS
Dharmendra Singh21 Jun 2017 14:27 #
Thanks for you guidance Christian it worked for me as you suggested.
RegardsDharmendra Kumar Singh
Quoted text · Christian Grün · 3 lines
On Wednesday, 21 June 2017 5:30 PM, Christian Grün <christian.gruen at gmail.com> wrote: > right now i am trying to set the path of the saxon9ee.jar > environment variable/path
Saxon needs to be specified in the Java classpath. How do you start BaseX?
Quoted text · Dharmendra Singh · 126 lines
On Wed, Jun 21, 2017 at 1:25 PM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > Hi Christian, > > As i have checked by running function xslt:processor() it is using java now > , so how can i use the saxon9ee.jar for the XSLT 2.0 can you describe the > process. > > > C:\Users\dharmendra.singh\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\dharmendra.singh\AppData\Local\Programs\Python\Python36\;C:\Users\dharmendra.singh\AppData\Local\Apps\cURL\bin;C:\Program > Files (x86)\Microsoft VS > Code\bin;C:\Users\dharmendra.singh\AppData\Roaming\npm,D:\Software\SaxonEE9-8-0-1J\saxon9he.jar > > but it is not working > > > > > On Wednesday, 21 June 2017 4:10 PM, Dharmendra Singh <dharam.mahi at gmail.com> > wrote: > > > As per documentation By default, this module uses Java’s XSLT 1.0, so if use > 2.0 we need to add saxon9he.jar in the classpath > > Regards > Dharmendra Kumar singh > > > On Wednesday, 21 June 2017 3:43 PM, Christian Grün > <christian.gruen at gmail.com> wrote: > > >> so can you please tell me what should i do. > > Sure: Read the documentation and find out why xslt:version() returns 1.0. ;) > > > On Wed, Jun 21, 2017 at 12:09 PM, Dharmendra Singh > <dharam.mahi at gmail.com> wrote: >> xslt:version() returning 1.0 and my XSLT expression for the 2.0 like >> <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' else >> 'ouput'"/> >> >> as per xslt 2.0 expression is right so can you please tell me what should >> i >> do. >> >> >> Regards >> Dharmendra kumar singh >> >> >> On Wednesday, 21 June 2017 3:20 PM, Christian Grün >> <christian.gruen at gmail.com> wrote: >> >> >> So Saxon is included in your classpath, and xslt:version() returns >> 2.0? In that case, you’ll obviously need to check your XSLT >> expression. >> >> >> On Wed, Jun 21, 2017 at 11:45 AM, Dharmendra Singh >> <dharam.mahi at gmail.com> wrote: >>> Yes the example which has been given for the 2.0 running perfect but when >>> i >>> am adding the line "if($editmode eq $EDIT-FULL) then 'textarea' else >>> 'ouput' >>> in my example it is giving error: >>> >>> [bxerr:BXSL0001] ERROR: 'Syntax error in 'if($editmode eq $EDIT-FULL) >>> then >>> 'textarea' else 'ouput''.' >>> FATAL ERROR: ': line 1: Required attribute 'select' is missing.' >>> >>> and same code running on my oxygen editor. >>> >>> >>> Regards >>> Dharmendra Kumar Singh >>> >>> >>> On Wednesday, 21 June 2017 2:54 PM, Christian Grün >>> <christian.gruen at gmail.com> wrote: >>> >>> >>> Did you check out the documentation >>> (http://docs.basex.org/wiki/XSLT_Module)? >>> >>> >>> On Wed, Jun 21, 2017 at 11:19 AM, Dharmendra Singh >>> <dharam.mahi at gmail.com> wrote: >>>> Hi all i am trying to run XSLT 2.0 but it is giving the error when i run >>>> xslt 1.0 it fine but i am not able to run XSLT 2.0, is there any way to >>>> run >>>> XSLT 2.0, below is my code. >>>> >>>> >>>> >>>> let $xslt := >>>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>> xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" >>>> version="2.0"> >>>> <xsl:variable name="editmode" select="dharam"/> >>>> <xsl:variable name="EDIT-FULL" select="dharam"/> >>>> <xsl:template match="/"> >>>> <xsl:value-of select="if($editmode eq $EDIT-FULL) then 'textarea' >>>> else 'ouput'"/> >>>> </xsl:template> >>>> </xsl:stylesheet> >>>> >>>> return >>>> >>>> xslt:transform(<p>1111</p>, $xslt) >>>> >>>> >>>> >>>> Regards >>>> Dharmendra Kumar Singh >>> >>> >> >> > > > >
Written for BaseX 8.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery