Saxon/C PHP API setParameter

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

Saxon/C PHP API setParameter

Christian Schwaderer
Hi all,

I finally managed to get Saxon/C PHP extension to work! (Thanks again to O'Neil and Ruprecht!)

But I didn't succede in passing Parameters to Saxon.

In my stylesheet a parameter is defined like this:

<xsl:param name="is_default" as="xs:string" select="'true'"/>

I tried to set the parameter in PHP with
$xslt_processor_instance->setParameter('is_default', 'false');

But calling a test XLST file with the line
<xsl:value-of select="$is_default"/>
resulted in the default value "true" instead of the passed value "false".

So, obviously the parameter passing didn't work.

In the documentation the function setParameter is explained:
void setParameter(string $name, XdmValue $value)
There are just two parameters

But in the sample files there is for example the line
$proc->setParameter('', 'assertion', $xdmValue);

What is that empty first parameter '' ?

By the way, I also tried
$xslt_processor_instance->setParameter('','is_default', 'false');
but with the same result.

What do I wrong?

Thanks in advance!

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon/C PHP API setParameter

Ruprecht von Waldenfels
Hi,
again, I had the same problem :-)
you first have to construct the XdmValue from the string. You cannot just pass a string.
So to set two values (as sting in $viztype and $vizsubtype) you go as below:

$xdmvalue = $proc->createXdmValue(strval($viztype));
$proc->setParameter('mode', $xdmvalue);
$xdmvalue1 = $proc->createXdmValue($vizsubtype);
$proc->setParameter('types', $xdmvalue1);

strangely enough, I needed to give separate variables for the two calls. But now it works.

Best, R


Am 12.06.2014 10:10, schrieb Christian Schwaderer:
Hi all,

I finally managed to get Saxon/C PHP extension to work! (Thanks again to O'Neil and Ruprecht!)

But I didn't succede in passing Parameters to Saxon.

In my stylesheet a parameter is defined like this:

<xsl:param name="is_default" as="xs:string" select="'true'"/>

I tried to set the parameter in PHP with
$xslt_processor_instance->setParameter('is_default', 'false');

But calling a test XLST file with the line
<xsl:value-of select="$is_default"/>
resulted in the default value "true" instead of the passed value "false".

So, obviously the parameter passing didn't work.

In the documentation the function setParameter is explained:
void setParameter(string $name, XdmValue $value)
There are just two parameters

But in the sample files there is for example the line
$proc->setParameter('', 'assertion', $xdmValue);

What is that empty first parameter '' ?

By the way, I also tried
$xslt_processor_instance->setParameter('','is_default', 'false');
but with the same result.

What do I wrong?

Thanks in advance!


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon/C PHP API setParameter

Christian Schwaderer
Thanks again!

It works now for me, but only if I add the empty parameter value '' in setParameter like
$proc->setParameter('','name_as_string',$just_created_XdmValue);

So, what is this strange first parameter of setParameter?


Date: Thu, 12 Jun 2014 11:22:46 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [saxon] Saxon/C PHP API setParameter

Hi,
again, I had the same problem :-)
you first have to construct the XdmValue from the string. You cannot just pass a string.
So to set two values (as sting in $viztype and $vizsubtype) you go as below:

$xdmvalue = $proc->createXdmValue(strval($viztype));
$proc->setParameter('mode', $xdmvalue);
$xdmvalue1 = $proc->createXdmValue($vizsubtype);
$proc->setParameter('types', $xdmvalue1);

strangely enough, I needed to give separate variables for the two calls. But now it works.

Best, R


Am 12.06.2014 10:10, schrieb Christian Schwaderer:
Hi all,

I finally managed to get Saxon/C PHP extension to work! (Thanks again to O'Neil and Ruprecht!)

But I didn't succede in passing Parameters to Saxon.

In my stylesheet a parameter is defined like this:

<xsl:param name="is_default" as="xs:string" select="'true'"/>

I tried to set the parameter in PHP with
$xslt_processor_instance->setParameter('is_default', 'false');

But calling a test XLST file with the line
<xsl:value-of select="$is_default"/>
resulted in the default value "true" instead of the passed value "false".

So, obviously the parameter passing didn't work.

In the documentation the function setParameter is explained:
void setParameter(string $name, XdmValue $value)
There are just two parameters

But in the sample files there is for example the line
$proc->setParameter('', 'assertion', $xdmValue);

What is that empty first parameter '' ?

By the way, I also tried
$xslt_processor_instance->setParameter('','is_default', 'false');
but with the same result.

What do I wrong?

Thanks in advance!


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon/C PHP API setParameter

Ruprecht von Waldenfels
Leave that questions to the gods and be happy that it works, is my suggestion...

Am 12.06.2014 12:10, schrieb Christian Schwaderer:
Thanks again!

It works now for me, but only if I add the empty parameter value '' in setParameter like
$proc->setParameter('','name_as_string',$just_created_XdmValue);

So, what is this strange first parameter of setParameter?


Date: Thu, 12 Jun 2014 11:22:46 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [saxon] Saxon/C PHP API setParameter

Hi,
again, I had the same problem :-)
you first have to construct the XdmValue from the string. You cannot just pass a string.
So to set two values (as sting in $viztype and $vizsubtype) you go as below:

$xdmvalue = $proc->createXdmValue(strval($viztype));
$proc->setParameter('mode', $xdmvalue);
$xdmvalue1 = $proc->createXdmValue($vizsubtype);
$proc->setParameter('types', $xdmvalue1);

strangely enough, I needed to give separate variables for the two calls. But now it works.

Best, R


Am 12.06.2014 10:10, schrieb Christian Schwaderer:
Hi all,

I finally managed to get Saxon/C PHP extension to work! (Thanks again to O'Neil and Ruprecht!)

But I didn't succede in passing Parameters to Saxon.

In my stylesheet a parameter is defined like this:

<xsl:param name="is_default" as="xs:string" select="'true'"/>

I tried to set the parameter in PHP with
$xslt_processor_instance->setParameter('is_default', 'false');

But calling a test XLST file with the line
<xsl:value-of select="$is_default"/>
resulted in the default value "true" instead of the passed value "false".

So, obviously the parameter passing didn't work.

In the documentation the function setParameter is explained:
void setParameter(string $name, XdmValue $value)
There are just two parameters

But in the sample files there is for example the line
$proc->setParameter('', 'assertion', $xdmValue);

What is that empty first parameter '' ?

By the way, I also tried
$xslt_processor_instance->setParameter('','is_default', 'false');
but with the same result.

What do I wrong?

Thanks in advance!


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon/C PHP API setParameter

Vasil Rangelov
In reply to this post by Christian Schwaderer

Hi.

 

It’s a namespace URI. XSLT parameters have qualified names, same as nodes.

 

From: Christian Schwaderer [mailto:[hidden email]]
Sent: Thursday, June 12, 2014 1:11 PM
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] Saxon/C PHP API setParameter

 

Thanks again!

It works now for me, but only if I add the empty parameter value '' in setParameter like
$proc->setParameter('','name_as_string',$just_created_XdmValue);

So, what is this strange first parameter of setParameter?


Date: Thu, 12 Jun 2014 11:22:46 +0200
From: [hidden email]
To: [hidden email]
Subject: Re: [saxon] Saxon/C PHP API setParameter

Hi,
again, I had the same problem :-)
you first have to construct the XdmValue from the string. You cannot just pass a string.
So to set two values (as sting in $viztype and $vizsubtype) you go as below:

$xdmvalue = $proc->createXdmValue(strval($viztype));
$proc->setParameter('mode', $xdmvalue);
$xdmvalue1 = $proc->createXdmValue($vizsubtype);
$proc->setParameter('types', $xdmvalue1);

strangely enough, I needed to give separate variables for the two calls. But now it works.

Best, R


Am 12.06.2014 10:10, schrieb Christian Schwaderer:

Hi all,

I finally managed to get Saxon/C PHP extension to work! (Thanks again to O'Neil and Ruprecht!)

But I didn't succede in passing Parameters to Saxon.

In my stylesheet a parameter is defined like this:

<xsl:param name="is_default" as="xs:string" select="'true'"/>

I tried to set the parameter in PHP with
$xslt_processor_instance->setParameter('is_default', 'false');

But calling a test XLST file with the line
<xsl:value-of select="$is_default"/>
resulted in the default value "true" instead of the passed value "false".

So, obviously the parameter passing didn't work.

In the documentation the function setParameter is explained:
void setParameter(string $name, XdmValue $value)
There are just two parameters

But in the sample files there is for example the line
$proc->setParameter('', 'assertion', $xdmValue);

What is that empty first parameter '' ?

By the way, I also tried
$xslt_processor_instance->setParameter('','is_default', 'false');
but with the same result.

What do I wrong?

Thanks in advance!



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems



_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 



------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon/C PHP API setParameter

O'Neil Delpratt
In reply to this post by Christian Schwaderer

On 12 Jun 2014, at 11:10, Christian Schwaderer <[hidden email]> wrote:

It works now for me, but only if I add the empty parameter value '' in setParameter like
$proc->setParameter('','name_as_string',$just_created_XdmValue);

So, what is this strange first parameter of setParameter?

The first parameter is there to provide the namespace, but it is not actually used. Initially we tried to design the API of Saxon/C inline with libxslt (i.e. http://www.php.net/manual/en/xsltprocessor.setparameter.php), but the problem is libxslt is a XSLT 1.0 processor which will not suffice a XSLT 2.0 processor, so we have had to rethink on several of the design decisions.

Incidentally, I have dropped the namespace parameter from the next release because it is not used, but we might reintroduce it later if required.

kind regards,

-------------------------------
O'Neil Delpratt
Software Developer, Saxonica Limited Email: [hidden email]
Tel: +44 118 946 5894
Web: http://www.saxonica.com
Saxonica Community site: http://dev.saxonica.com
Bug tracking site: https://saxonica.plan.io/




------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon/C PHP API setParameter

Martin Honnen-2
In reply to this post by Christian Schwaderer
Christian Schwaderer wrote:

> It works now for me, but only if I add the empty parameter value '' in
> setParameter like
> $proc->setParameter('','name_as_string',$just_created_XdmValue);
>
> So, what is this strange first parameter of setParameter?

In general parameters can have qualified names with a namespace and a
local name so the first parameter is likely the namespace URI, in case
you would define

<xsl:param name="pf:param-name" xmlns:pf="http://example.com/"/>

you would set
  setParameter("http://example/com/", "param-name", value)

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon/C PHP API setParameter

Vasil Rangelov
In reply to this post by O'Neil Delpratt

I’d suggest you keep the namespace parameter… And if you want to simplify things, keep it as a third argument that defaults to no namespace – You’re simplifying things without losing any flexibility.

 

From: O'Neil Delpratt [mailto:[hidden email]]
Sent: Thursday, June 12, 2014 1:34 PM
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] Saxon/C PHP API setParameter

 

 

On 12 Jun 2014, at 11:10, Christian Schwaderer <[hidden email]> wrote:



It works now for me, but only if I add the empty parameter value '' in setParameter like
$proc->setParameter('','name_as_string',$just_created_XdmValue);

So, what is this strange first parameter of setParameter?

 

The first parameter is there to provide the namespace, but it is not actually used. Initially we tried to design the API of Saxon/C inline with libxslt (i.e. http://www.php.net/manual/en/xsltprocessor.setparameter.php), but the problem is libxslt is a XSLT 1.0 processor which will not suffice a XSLT 2.0 processor, so we have had to rethink on several of the design decisions.

 

Incidentally, I have dropped the namespace parameter from the next release because it is not used, but we might reintroduce it later if required.

 

kind regards,

 

-------------------------------
O'Neil Delpratt
Software Developer, Saxonica Limited Email: [hidden email]
Tel: +44 118 946 5894
Web: http://www.saxonica.com
Saxonica Community site: http://dev.saxonica.com
Bug tracking site: https://saxonica.plan.io/

 


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon/C PHP API setParameter

O'Neil Delpratt
In reply to this post by Martin Honnen-2

On 12 Jun 2014, at 11:34, Martin Honnen <[hidden email]> wrote:

In general parameters can have qualified names with a namespace and a 
local name so the first parameter is likely the namespace URI, in case 
you would define

<xsl:param name="pf:param-name" xmlns:pf="http://example.com/"/>

you would set
 setParameter("http://example/com/", "param-name", value)


I have added this as a bug to Saxon/C (see: https://saxonica.plan.io/issues/2088). The namespace URI as yet are not being passed through.

-------------------------------
O'Neil Delpratt
Software Developer, Saxonica Limited Email: [hidden email]
Tel: +44 118 946 5894
Web: http://www.saxonica.com
Saxonica Community site: http://dev.saxonica.com
Bug tracking site: https://saxonica.plan.io/




------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon/C PHP API setParameter

O'Neil Delpratt
In reply to this post by Vasil Rangelov

On 12 Jun 2014, at 11:43, Vasil Rangelov <[hidden email]> wrote:

I’d suggest you keep the namespace parameter… And if you want to simplify things, keep it as a third argument that defaults to no namespace – You’re simplifying things without losing any flexibility.

point taken.

Thanks

-------------------------------
O'Neil Delpratt
Software Developer, Saxonica Limited Email: [hidden email]
Tel: +44 118 946 5894
Web: http://www.saxonica.com
Saxonica Community site: http://dev.saxonica.com
Bug tracking site: https://saxonica.plan.io/




------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon/C PHP API setParameter

Michael Kay
In reply to this post by O'Neil Delpratt
I'm inclined to suggest using the JAXP solution here: a single string parameter, which is in the form "{uri}local" in the case where the name is namespaced.

Michael Kay
Saxonica
+44 (0118) 946 5893



On 12 Jun 2014, at 11:33, O'Neil Delpratt <[hidden email]> wrote:


On 12 Jun 2014, at 11:10, Christian Schwaderer <[hidden email]> wrote:

It works now for me, but only if I add the empty parameter value '' in setParameter like
$proc->setParameter('','name_as_string',$just_created_XdmValue);

So, what is this strange first parameter of setParameter?

The first parameter is there to provide the namespace, but it is not actually used. Initially we tried to design the API of Saxon/C inline with libxslt (i.e. http://www.php.net/manual/en/xsltprocessor.setparameter.php), but the problem is libxslt is a XSLT 1.0 processor which will not suffice a XSLT 2.0 processor, so we have had to rethink on several of the design decisions.

Incidentally, I have dropped the namespace parameter from the next release because it is not used, but we might reintroduce it later if required.

kind regards,

-------------------------------
O'Neil Delpratt
Software Developer, Saxonica Limited Email: [hidden email]
Tel: +44 118 946 5894
Web: http://www.saxonica.com
Saxonica Community site: http://dev.saxonica.com
Bug tracking site: https://saxonica.plan.io/



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Saxon/C PHP API setParameter

O'Neil Delpratt

On 17 Jun 2014, at 08:55, Michael Kay <[hidden email]> wrote:

I'm inclined to suggest using the JAXP solution here: a single string parameter, which is in the form "{uri}local" in the case where the name is namespaced.


As suggested I think we will go with the JAXP solution. It seems much simpler to implement internally when passing the string to the Saxon core.

I have now closed the related bug issue with this solution: https://saxonica.plan.io/issues/2088






On 12 Jun 2014, at 11:33, O'Neil Delpratt <[hidden email]> wrote:


On 12 Jun 2014, at 11:10, Christian Schwaderer <[hidden email]> wrote:

It works now for me, but only if I add the empty parameter value '' in setParameter like
$proc->setParameter('','name_as_string',$just_created_XdmValue);

So, what is this strange first parameter of setParameter?

The first parameter is there to provide the namespace, but it is not actually used. Initially we tried to design the API of Saxon/C inline with libxslt (i.e. http://www.php.net/manual/en/xsltprocessor.setparameter.php), but the problem is libxslt is a XSLT 1.0 processor which will not suffice a XSLT 2.0 processor, so we have had to rethink on several of the design decisions.

Incidentally, I have dropped the namespace parameter from the next release because it is not used, but we might reintroduce it later if required.

kind regards,

-------------------------------
O'Neil Delpratt
Software Developer, Saxonica Limited Email: [hidden email]
Tel: +44 118 946 5894
Web: http://www.saxonica.com
Saxonica Community site: http://dev.saxonica.com
Bug tracking site: https://saxonica.plan.io/



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help

-------------------------------
O'Neil Delpratt
Software Developer, Saxonica Limited Email: [hidden email]
Tel: +44 118 946 5894
Web: http://www.saxonica.com
Saxonica Community site: http://dev.saxonica.com
Bug tracking site: https://saxonica.plan.io/




------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help