XSLTProcessor name with Saxon/C

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

XSLTProcessor name with Saxon/C

Kevin S. Clarke
Hi,

I was able to download the source for Saxon/C, compile it, and run a simple transformation on my server.  However, I need to be able to use the pre-existing PHP XSLTProcessor class (that supports XSLT 1.0) within the same code base as I want to use Saxon/C. This is a problem because of the name clash between Saxon's XsltProcessor and the older PHP XSLTProcessor.  I noticed, searching on this mailing list, that there was some discussion in 12/2013 on this topic, with some suggestions of renaming the Saxon class to Xslt2Processor or using a PHP namespace to distinguish the Saxon processor.  I was wondering whether any decision had been made about this (perhaps in a version of Saxon/C that is not yet available to the public)?

Thanks,
Kevinw


--
"There are two kinds of people in this world: those who believe there are two kinds of people in this world and those who know better."

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
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: XSLTProcessor name with Saxon/C

O'Neil Delpratt
Hi Kevin,

Thanks for raising this issue again. It seems to have got gone away some how.

I have created a bug entry to keep track of the issue:


I  would say that we should avoid such clashes and either use a different name or introduce a Saxon namespace. 

Looking back at the discussions on the mailing list there were a few options on the table. See summary of them below:

1) XSLT2Processor. The point was raised that this would not make sense since  Saxon supports XSLT 3.0. Maybe we could also have XSLT3Processor.
2) SAXONProcessor. This might be a safe option to avoid name clashes, but not keen on having Saxon within the name explicitly.
3) Use the namespace feature in PHP.

For option 3. see details for Jirka Kosek:

Also note that PHP since 5.3 support namespaces (aka Java packages). So
you can still use XsltProcessor classname withou any collisions if you
put it inside Saxon namespaces. New instance is then created by syntax like:

$xsltProc = new Saxon\XsltProcessor(...);

This naming pattern is not common yet for extensions as namespaces are
quite recent PHP feature.

I am probably in favour of option 3.

We will address this issue in the next release.

kind regards,

O'Neil


On 19 May 2015, at 03:06, Kevin S. Clarke <[hidden email]> wrote:

Hi,

I was able to download the source for Saxon/C, compile it, and run a simple transformation on my server.  However, I need to be able to use the pre-existing PHP XSLTProcessor class (that supports XSLT 1.0) within the same code base as I want to use Saxon/C. This is a problem because of the name clash between Saxon's XsltProcessor and the older PHP XSLTProcessor.  I noticed, searching on this mailing list, that there was some discussion in 12/2013 on this topic, with some suggestions of renaming the Saxon class to Xslt2Processor or using a PHP namespace to distinguish the Saxon processor.  I was wondering whether any decision had been made about this (perhaps in a version of Saxon/C that is not yet available to the public)?

Thanks,
Kevinw


--
"There are two kinds of people in this world: those who believe there are two kinds of people in this world and those who know better."
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
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: XSLTProcessor name with Saxon/C

Dave Pawson-2
KISS option?
I have batch files (scripts) named sax2 and sax3,
would that help with nomenclature?

regards

On 19 May 2015 at 10:38, O'Neil Delpratt <[hidden email]> wrote:

> Hi Kevin,
>
> Thanks for raising this issue again. It seems to have got gone away some
> how.
>
> I have created a bug entry to keep track of the issue:
>
> https://saxonica.plan.io/issues/2380
>
> I  would say that we should avoid such clashes and either use a different
> name or introduce a Saxon namespace.
>
> Looking back at the discussions on the mailing list there were a few options
> on the table. See summary of them below:
>
> 1) XSLT2Processor. The point was raised that this would not make sense since
> Saxon supports XSLT 3.0. Maybe we could also have XSLT3Processor.
> 2) SAXONProcessor. This might be a safe option to avoid name clashes, but
> not keen on having Saxon within the name explicitly.
> 3) Use the namespace feature in PHP.
>
> For option 3. see details for Jirka Kosek:
>
> Also note that PHP since 5.3 support namespaces (aka Java packages). So
> you can still use XsltProcessor classname withou any collisions if you
> put it inside Saxon namespaces. New instance is then created by syntax like:
>
> $xsltProc = new Saxon\XsltProcessor(...);
>
> This naming pattern is not common yet for extensions as namespaces are
> quite recent PHP feature.
>
> I am probably in favour of option 3.
>
> We will address this issue in the next release.
>
> kind regards,
>
> O'Neil
>
>
> On 19 May 2015, at 03:06, Kevin S. Clarke <[hidden email]> wrote:
>
> Hi,
>
> I was able to download the source for Saxon/C, compile it, and run a simple
> transformation on my server.  However, I need to be able to use the
> pre-existing PHP XSLTProcessor class (that supports XSLT 1.0) within the
> same code base as I want to use Saxon/C. This is a problem because of the
> name clash between Saxon's XsltProcessor and the older PHP XSLTProcessor.  I
> noticed, searching on this mailing list, that there was some discussion in
> 12/2013 on this topic, with some suggestions of renaming the Saxon class to
> Xslt2Processor or using a PHP namespace to distinguish the Saxon processor.
> I was wondering whether any decision had been made about this (perhaps in a
> version of Saxon/C that is not yet available to the public)?
>
> Thanks,
> Kevinw
>
>
> --
> "There are two kinds of people in this world: those who believe there are
> two kinds of people in this world and those who know better."
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help



--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
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: XSLTProcessor name with Saxon/C

Kevin S. Clarke
In reply to this post by O'Neil Delpratt
Thanks O'Neil.  Option 3 sounds the best to me too.

Kevin

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help