Re: .Net Extention

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Re: .Net Extention

by Ryan Puddephatt-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Change the Namespace.ClassName to ACM.testFunction and it should work
------------------------
Ryan Puddephatt
FIX Developer
Fidessa LatentZero
1 Alfred Place
London WC1E 7EB
Office: +44 (0) 20 7462 4200
Direct: +44 (0) 20 7323 6112
Blackberry: +44 (0) 79 8539 2458
Fax: +44 (0) 20 7462 4242
Email: rpuddephatt@...
Web: http://www.latentzero.com
Sent from my blackberry device

----- Original Message -----
From: saxon-help-bounces@... <saxon-help-bounces@...>
To: Mailing list for the SAXON XSLT and XQuery processor <saxon-help@...>
Sent: Fri Jul 11 13:35:26 2008
Subject: [saxon] .Net Extention

Hi,

I am trying to build a .NET extention using Saxon 9.006. It's a simple
.dll file to return the date.

I receive the following error:

Cannot find a matching 1-argument function named
{clitype:Namespace.ClassName?ACM=testFunction}returnDate()

I could not find any good examples to help me trouble shoot my problem.
My compliled .dll file is in the same folder as the saxon9.dll.


Here is my XSLT:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ACM="clitype:Namespace.ClassName?ACM=testFunction">
        <xsl:output method="html"/>
        <xsl:template match="/">
                <html>
                        <head>
                        </head>
                        <body>
                                <xsl:for-each select="/root">
                                        <h1>
                                                <xsl:value-of
select="ACM:returnDate(member)"/>
                                        </h1>
                                </xsl:for-each>
                        </body>
                </html>
        </xsl:template>
</xsl:stylesheet>

Here is my class:

Namespace ACM
    Public Class testFunction

        Public Function returnDate(ByVal xslDate As String) As String
            Return xslDate
        End Function

    End Class
End Namespace

Here is my input:

<?xml version="1.0" encoding="UTF-8"?>
<root>
        <member>2008-01-01</member>
        <member>2007-01-01</member>
</root>

Thanks,

Phil

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

Re: .Net Extention

by Bones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Ryan,

I tried the following:

xmlns:ACM="clitype:Namespace.ClassName?ACM.testFunction"
xmlns:ACM="clitype:ACM.testFunction">
xmlns:ACM="clitype:ACM.testFunction?ACM=testFunction">

Same error.

Regards,

Phil


-----Original Message-----
From: saxon-help-bounces@...
[mailto:saxon-help-bounces@...] On Behalf Of Ryan
Puddephatt
Sent: Friday, July 11, 2008 8:40 AM
To: saxon-help@...
Subject: Re: [saxon] .Net Extention

Change the Namespace.ClassName to ACM.testFunction and it should work
------------------------
Ryan Puddephatt
FIX Developer
Fidessa LatentZero
1 Alfred Place
London WC1E 7EB
Office: +44 (0) 20 7462 4200
Direct: +44 (0) 20 7323 6112
Blackberry: +44 (0) 79 8539 2458
Fax: +44 (0) 20 7462 4242
Email: rpuddephatt@...
Web: http://www.latentzero.com
Sent from my blackberry device

----- Original Message -----
From: saxon-help-bounces@...
<saxon-help-bounces@...>
To: Mailing list for the SAXON XSLT and XQuery processor
<saxon-help@...>
Sent: Fri Jul 11 13:35:26 2008
Subject: [saxon] .Net Extention

Hi,

I am trying to build a .NET extention using Saxon 9.006. It's a simple
.dll file to return the date.

I receive the following error:

Cannot find a matching 1-argument function named
{clitype:Namespace.ClassName?ACM=testFunction}returnDate()

I could not find any good examples to help me trouble shoot my problem.
My compliled .dll file is in the same folder as the saxon9.dll.


Here is my XSLT:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ACM="clitype:Namespace.ClassName?ACM=testFunction">
        <xsl:output method="html"/>
        <xsl:template match="/">
                <html>
                        <head>
                        </head>
                        <body>
                                <xsl:for-each select="/root">
                                        <h1>
                                                <xsl:value-of
select="ACM:returnDate(member)"/>
                                        </h1>
                                </xsl:for-each>
                        </body>
                </html>
        </xsl:template>
</xsl:stylesheet>

Here is my class:

Namespace ACM
    Public Class testFunction

        Public Function returnDate(ByVal xslDate As String) As String
            Return xslDate
        End Function

    End Class
End Namespace

Here is my input:

<?xml version="1.0" encoding="UTF-8"?>
<root>
        <member>2008-01-01</member>
        <member>2007-01-01</member>
</root>

Thanks,

Phil

------------------------------------------------------------------------
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

_______________________________________________________________________
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the
material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet
Managed Scanning Services - powered by MessageLabs. For further
information visit http://www.mci.com
------------------------------------------------------------------------
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

Re: .Net Extention

by Michael Kay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Firstly, it should be

xmlns:ACM="clitype:ACM.testFunction"

(In the documentation, Namespace.Classname is a placeholder for you to
substitute your own namespace and your own classname.)

Anything after the question mark is to help with the dynamic loading of the
assembly, and this starts to get very configuration-dependent. If your .dll
file is in the same directory as the .exe used to launch your application,
then the above should be enough on its own. (Putting it in a folder with
other .dll's is no use.) Alternatively, creating a reference from your
application to the assembly containing the extension function should work.

I don't know where you got the idea of writing ?ACM=testFunction. The list
of query parameters that Saxon recognizes in the namespace URI is at

http://www.saxonica.com/documentation/extensibility/dotnetextensions.html

(and "ACM" isn't one of them).

Dynamic loading on .NET can be tricky to get working properly, but you might
find the tips on the above page helpful. If you're running from the command
line, try using the -TJ extension, which will distinguish two kinds of
failure: failure to load the assembly containing your class, and failure to
find the method that you want to call.

There's also some advice on the Saxon Wiki at

http://saxon.wiki.sourceforge.net/CallingDotNet

(but I guess you've been there, it looks as if that's where the idea of
Namespace.ClassName may have come from...)

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

>
> I receive the following error:
>
> Cannot find a matching 1-argument function named
> {clitype:Namespace.ClassName?ACM=testFunction}returnDate()
>
> I could not find any good examples to help me trouble shoot
> my problem.
> My compliled .dll file is in the same folder as the saxon9.dll.
>
>
> Here is my XSLT:
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:ACM="clitype:Namespace.ClassName?ACM=testFunction">
> <xsl:output method="html"/>
> <xsl:template match="/">
> <html>
> <head>
> </head>
> <body>
> <xsl:for-each select="/root">
> <h1>
> <xsl:value-of
> select="ACM:returnDate(member)"/>
> </h1>
> </xsl:for-each>
> </body>
> </html>
> </xsl:template>
> </xsl:stylesheet>
>
> Here is my class:
>
> Namespace ACM
>     Public Class testFunction
>
>         Public Function returnDate(ByVal xslDate As String) As String
>             Return xslDate
>         End Function
>
>     End Class
> End Namespace
>
> Here is my input:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <member>2008-01-01</member>
> <member>2007-01-01</member>
> </root>
>
> Thanks,
>
> Phil


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

Re: .Net Extention

by Bones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Michael,

Running from the command line with -TJ, I get

Loading clitype:asm.testFunction
No Java class clitype:asm.testFunction could be loaded
Failed to load type asm.testFunction: Could not load type
'asm.testFunction' fro
m assembly 'saxon9, Version=9.0.0.6, Culture=neutral,
PublicKeyToken=e1fdd002d50
83fe6'.
Error on line 11 of file:///C:/sandbox/saxon_ext/test.xslt:
  Cannot find a matching 1-argument function named
{clitype:asm.testFunction}ret
urnDate()
Transformation failed: Run-time errors were reported

Also I was  unable to get to:
http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm
l

It looks like it was down.

Thanks,


Philip Vallone
Web Developer
General Dynamics Information Technology
(732) 532-6997
Philip.Vallone@...


-----Original Message-----
From: saxon-help-bounces@...
[mailto:saxon-help-bounces@...] On Behalf Of Michael
Kay
Sent: Friday, July 11, 2008 12:17 PM
To: 'Mailing list for the SAXON XSLT and XQuery processor'
Subject: Re: [saxon] .Net Extention


Firstly, it should be

xmlns:ACM="clitype:ACM.testFunction"

(In the documentation, Namespace.Classname is a placeholder for you to
substitute your own namespace and your own classname.)

Anything after the question mark is to help with the dynamic loading of
the assembly, and this starts to get very configuration-dependent. If
your .dll file is in the same directory as the .exe used to launch your
application, then the above should be enough on its own. (Putting it in
a folder with other .dll's is no use.) Alternatively, creating a
reference from your application to the assembly containing the extension
function should work.

I don't know where you got the idea of writing ?ACM=testFunction. The
list of query parameters that Saxon recognizes in the namespace URI is
at

http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm
l

(and "ACM" isn't one of them).

Dynamic loading on .NET can be tricky to get working properly, but you
might find the tips on the above page helpful. If you're running from
the command line, try using the -TJ extension, which will distinguish
two kinds of
failure: failure to load the assembly containing your class, and failure
to find the method that you want to call.

There's also some advice on the Saxon Wiki at

http://saxon.wiki.sourceforge.net/CallingDotNet

(but I guess you've been there, it looks as if that's where the idea of
Namespace.ClassName may have come from...)

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

>
> I receive the following error:
>
> Cannot find a matching 1-argument function named
> {clitype:Namespace.ClassName?ACM=testFunction}returnDate()
>
> I could not find any good examples to help me trouble shoot my
> problem.
> My compliled .dll file is in the same folder as the saxon9.dll.
>
>
> Here is my XSLT:
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:ACM="clitype:Namespace.ClassName?ACM=testFunction">
> <xsl:output method="html"/>
> <xsl:template match="/">
> <html>
> <head>
> </head>
> <body>
> <xsl:for-each select="/root">
> <h1>
> <xsl:value-of
> select="ACM:returnDate(member)"/>
> </h1>
> </xsl:for-each>
> </body>
> </html>
> </xsl:template>
> </xsl:stylesheet>
>
> Here is my class:
>
> Namespace ACM
>     Public Class testFunction
>
>         Public Function returnDate(ByVal xslDate As String) As String
>             Return xslDate
>         End Function
>
>     End Class
> End Namespace
>
> Here is my input:
>
> <?xml version="1.0" encoding="UTF-8"?> <root>
> <member>2008-01-01</member>
> <member>2007-01-01</member>
> </root>
>
> Thanks,
>
> Phil


------------------------------------------------------------------------
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

Re: .Net Extention

by Joe Fawcett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The URL has split:

http://www.saxonica.com/documentation/extensibility/dotnetextensions.html

Joe
http://joe.fawcett.name
--------------------------------------------------
From: "Vallone, Philip Mr CTR USA AMC" <Philip.Vallone@...>
Sent: Friday, July 11, 2008 5:58 PM
To: "Mailing list for the SAXON XSLT and XQuery processor"
<saxon-help@...>
Subject: Re: [saxon] .Net Extention

> Thanks Michael,
>
> Running from the command line with -TJ, I get
>
> Loading clitype:asm.testFunction
> No Java class clitype:asm.testFunction could be loaded
> Failed to load type asm.testFunction: Could not load type
> 'asm.testFunction' fro
> m assembly 'saxon9, Version=9.0.0.6, Culture=neutral,
> PublicKeyToken=e1fdd002d50
> 83fe6'.
> Error on line 11 of file:///C:/sandbox/saxon_ext/test.xslt:
>  Cannot find a matching 1-argument function named
> {clitype:asm.testFunction}ret
> urnDate()
> Transformation failed: Run-time errors were reported
>
> Also I was  unable to get to:
> http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm
> l
>
> It looks like it was down.
>
> Thanks,
>
>
> Philip Vallone
> Web Developer
> General Dynamics Information Technology
> (732) 532-6997
> Philip.Vallone@...
>
>
> -----Original Message-----
> From: saxon-help-bounces@...
> [mailto:saxon-help-bounces@...] On Behalf Of Michael
> Kay
> Sent: Friday, July 11, 2008 12:17 PM
> To: 'Mailing list for the SAXON XSLT and XQuery processor'
> Subject: Re: [saxon] .Net Extention
>
>
> Firstly, it should be
>
> xmlns:ACM="clitype:ACM.testFunction"
>
> (In the documentation, Namespace.Classname is a placeholder for you to
> substitute your own namespace and your own classname.)
>
> Anything after the question mark is to help with the dynamic loading of
> the assembly, and this starts to get very configuration-dependent. If
> your .dll file is in the same directory as the .exe used to launch your
> application, then the above should be enough on its own. (Putting it in
> a folder with other .dll's is no use.) Alternatively, creating a
> reference from your application to the assembly containing the extension
> function should work.
>
> I don't know where you got the idea of writing ?ACM=testFunction. The
> list of query parameters that Saxon recognizes in the namespace URI is
> at
>
> http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm
> l
>
> (and "ACM" isn't one of them).
>
> Dynamic loading on .NET can be tricky to get working properly, but you
> might find the tips on the above page helpful. If you're running from
> the command line, try using the -TJ extension, which will distinguish
> two kinds of
> failure: failure to load the assembly containing your class, and failure
> to find the method that you want to call.
>
> There's also some advice on the Saxon Wiki at
>
> http://saxon.wiki.sourceforge.net/CallingDotNet
>
> (but I guess you've been there, it looks as if that's where the idea of
> Namespace.ClassName may have come from...)
>
> Michael Kay
> http://www.saxonica.com/
>
>>
>> I receive the following error:
>>
>> Cannot find a matching 1-argument function named
>> {clitype:Namespace.ClassName?ACM=testFunction}returnDate()
>>
>> I could not find any good examples to help me trouble shoot my
>> problem.
>> My compliled .dll file is in the same folder as the saxon9.dll.
>>
>>
>> Here is my XSLT:
>>
>> <xsl:stylesheet version="1.0"
>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> xmlns:ACM="clitype:Namespace.ClassName?ACM=testFunction">
>> <xsl:output method="html"/>
>> <xsl:template match="/">
>> <html>
>> <head>
>> </head>
>> <body>
>> <xsl:for-each select="/root">
>> <h1>
>> <xsl:value-of
>> select="ACM:returnDate(member)"/>
>> </h1>
>> </xsl:for-each>
>> </body>
>> </html>
>> </xsl:template>
>> </xsl:stylesheet>
>>
>> Here is my class:
>>
>> Namespace ACM
>>     Public Class testFunction
>>
>>         Public Function returnDate(ByVal xslDate As String) As String
>>             Return xslDate
>>         End Function
>>
>>     End Class
>> End Namespace
>>
>> Here is my input:
>>
>> <?xml version="1.0" encoding="UTF-8"?> <root>
>> <member>2008-01-01</member>
>> <member>2007-01-01</member>
>> </root>
>>
>> Thanks,
>>
>> Phil
>
>
> ------------------------------------------------------------------------
> -
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

Re: .Net Extention

by Ryan Puddephatt-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Also your namespace path isn't correct

Namespace ACM
   Class testFunction

Should translate to

ACM.testFunction

-----------------------------------------------
Ryan Puddephatt
FIX Developer
Fidessa LatentZero
1 Alfred Place
London WC1E 7EB
Office: +44 (0) 20 7462 4200
Direct: +44 (0) 20 7323 6112
Blackberry: +44 (0) 79 8539 2458
Fax: +44 (0) 20 7462 4242
Email: rpuddephatt@...
Web: http://www.latentzero.com


-----Original Message-----
From: saxon-help-bounces@...
[mailto:saxon-help-bounces@...] On Behalf Of Joe
Fawcett
Sent: 11 July 2008 18:02
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] .Net Extention

The URL has split:

http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm
l

Joe
http://joe.fawcett.name
--------------------------------------------------
From: "Vallone, Philip Mr CTR USA AMC" <Philip.Vallone@...>
Sent: Friday, July 11, 2008 5:58 PM
To: "Mailing list for the SAXON XSLT and XQuery processor"
<saxon-help@...>
Subject: Re: [saxon] .Net Extention

> Thanks Michael,
>
> Running from the command line with -TJ, I get
>
> Loading clitype:asm.testFunction
> No Java class clitype:asm.testFunction could be loaded
> Failed to load type asm.testFunction: Could not load type
> 'asm.testFunction' fro
> m assembly 'saxon9, Version=9.0.0.6, Culture=neutral,
> PublicKeyToken=e1fdd002d50
> 83fe6'.
> Error on line 11 of file:///C:/sandbox/saxon_ext/test.xslt:
>  Cannot find a matching 1-argument function named
> {clitype:asm.testFunction}ret
> urnDate()
> Transformation failed: Run-time errors were reported
>
> Also I was  unable to get to:
>
http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm

> l
>
> It looks like it was down.
>
> Thanks,
>
>
> Philip Vallone
> Web Developer
> General Dynamics Information Technology
> (732) 532-6997
> Philip.Vallone@...
>
>
> -----Original Message-----
> From: saxon-help-bounces@...
> [mailto:saxon-help-bounces@...] On Behalf Of Michael
> Kay
> Sent: Friday, July 11, 2008 12:17 PM
> To: 'Mailing list for the SAXON XSLT and XQuery processor'
> Subject: Re: [saxon] .Net Extention
>
>
> Firstly, it should be
>
> xmlns:ACM="clitype:ACM.testFunction"
>
> (In the documentation, Namespace.Classname is a placeholder for you to
> substitute your own namespace and your own classname.)
>
> Anything after the question mark is to help with the dynamic loading
of
> the assembly, and this starts to get very configuration-dependent. If
> your .dll file is in the same directory as the .exe used to launch
your
> application, then the above should be enough on its own. (Putting it
in
> a folder with other .dll's is no use.) Alternatively, creating a
> reference from your application to the assembly containing the
extension
> function should work.
>
> I don't know where you got the idea of writing ?ACM=testFunction. The
> list of query parameters that Saxon recognizes in the namespace URI is
> at
>
>
http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm
> l
>
> (and "ACM" isn't one of them).
>
> Dynamic loading on .NET can be tricky to get working properly, but you
> might find the tips on the above page helpful. If you're running from
> the command line, try using the -TJ extension, which will distinguish
> two kinds of
> failure: failure to load the assembly containing your class, and
failure
> to find the method that you want to call.
>
> There's also some advice on the Saxon Wiki at
>
> http://saxon.wiki.sourceforge.net/CallingDotNet
>
> (but I guess you've been there, it looks as if that's where the idea
of

> Namespace.ClassName may have come from...)
>
> Michael Kay
> http://www.saxonica.com/
>
>>
>> I receive the following error:
>>
>> Cannot find a matching 1-argument function named
>> {clitype:Namespace.ClassName?ACM=testFunction}returnDate()
>>
>> I could not find any good examples to help me trouble shoot my
>> problem.
>> My compliled .dll file is in the same folder as the saxon9.dll.
>>
>>
>> Here is my XSLT:
>>
>> <xsl:stylesheet version="1.0"
>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> xmlns:ACM="clitype:Namespace.ClassName?ACM=testFunction">
>> <xsl:output method="html"/>
>> <xsl:template match="/">
>> <html>
>> <head>
>> </head>
>> <body>
>> <xsl:for-each select="/root">
>> <h1>
>> <xsl:value-of
>> select="ACM:returnDate(member)"/>
>> </h1>
>> </xsl:for-each>
>> </body>
>> </html>
>> </xsl:template>
>> </xsl:stylesheet>
>>
>> Here is my class:
>>
>> Namespace ACM
>>     Public Class testFunction
>>
>>         Public Function returnDate(ByVal xslDate As String) As String
>>             Return xslDate
>>         End Function
>>
>>     End Class
>> End Namespace
>>
>> Here is my input:
>>
>> <?xml version="1.0" encoding="UTF-8"?> <root>
>> <member>2008-01-01</member>
>> <member>2007-01-01</member>
>> </root>
>>
>> Thanks,
>>
>> Phil
>
>
>
------------------------------------------------------------------------

> -
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
------------------------------------------------------------------------
-
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>

------------------------------------------------------------------------
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

_______________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

Re: .Net Extention

by Bones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Ryan,

I am a bit confused. This is what I have so far.

Xslt:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ACM="clitype:asm.testFunction">
        <xsl:output method="html"/>
        <xsl:template match="/">
                <html>
                        <head>
                        </head>
                        <body>
                                <xsl:for-each select="/root">
                                        <h1>
                                                <xsl:value-of
select="ACM:returnDate(member)"/>
                                        </h1>
                                </xsl:for-each>
                        </body>
                </html>
        </xsl:template>
</xsl:stylesheet>

Class:

Namespace ACM
    Public Class testFunction

        Public Shared Function returnDate(ByVal xslDate As String) As
String
            Return xslDate
        End Function

    End Class
End Namespace

What should it be?

Thx



-----Original Message-----
From: saxon-help-bounces@...
[mailto:saxon-help-bounces@...] On Behalf Of Ryan
Puddephatt
Sent: Friday, July 11, 2008 1:05 PM
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] .Net Extention

Also your namespace path isn't correct

Namespace ACM
   Class testFunction

Should translate to

ACM.testFunction

-----------------------------------------------
Ryan Puddephatt
FIX Developer
Fidessa LatentZero
1 Alfred Place
London WC1E 7EB
Office: +44 (0) 20 7462 4200
Direct: +44 (0) 20 7323 6112
Blackberry: +44 (0) 79 8539 2458
Fax: +44 (0) 20 7462 4242
Email: rpuddephatt@...
Web: http://www.latentzero.com


-----Original Message-----
From: saxon-help-bounces@...
[mailto:saxon-help-bounces@...] On Behalf Of Joe
Fawcett
Sent: 11 July 2008 18:02
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] .Net Extention

The URL has split:

http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm
l

Joe
http://joe.fawcett.name
--------------------------------------------------
From: "Vallone, Philip Mr CTR USA AMC" <Philip.Vallone@...>
Sent: Friday, July 11, 2008 5:58 PM
To: "Mailing list for the SAXON XSLT and XQuery processor"
<saxon-help@...>
Subject: Re: [saxon] .Net Extention

> Thanks Michael,
>
> Running from the command line with -TJ, I get
>
> Loading clitype:asm.testFunction
> No Java class clitype:asm.testFunction could be loaded Failed to load
> type asm.testFunction: Could not load type 'asm.testFunction' fro m
> assembly 'saxon9, Version=9.0.0.6, Culture=neutral,
> PublicKeyToken=e1fdd002d50 83fe6'.
> Error on line 11 of file:///C:/sandbox/saxon_ext/test.xslt:
>  Cannot find a matching 1-argument function named
> {clitype:asm.testFunction}ret
> urnDate()
> Transformation failed: Run-time errors were reported
>
> Also I was  unable to get to:
>
http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm

> l
>
> It looks like it was down.
>
> Thanks,
>
>
> Philip Vallone
> Web Developer
> General Dynamics Information Technology
> (732) 532-6997
> Philip.Vallone@...
>
>
> -----Original Message-----
> From: saxon-help-bounces@...
> [mailto:saxon-help-bounces@...] On Behalf Of Michael

> Kay
> Sent: Friday, July 11, 2008 12:17 PM
> To: 'Mailing list for the SAXON XSLT and XQuery processor'
> Subject: Re: [saxon] .Net Extention
>
>
> Firstly, it should be
>
> xmlns:ACM="clitype:ACM.testFunction"
>
> (In the documentation, Namespace.Classname is a placeholder for you to

> substitute your own namespace and your own classname.)
>
> Anything after the question mark is to help with the dynamic loading
of
> the assembly, and this starts to get very configuration-dependent. If
> your .dll file is in the same directory as the .exe used to launch
your
> application, then the above should be enough on its own. (Putting it
in
> a folder with other .dll's is no use.) Alternatively, creating a
> reference from your application to the assembly containing the
extension
> function should work.
>
> I don't know where you got the idea of writing ?ACM=testFunction. The
> list of query parameters that Saxon recognizes in the namespace URI is

> at
>
>
http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm
> l
>
> (and "ACM" isn't one of them).
>
> Dynamic loading on .NET can be tricky to get working properly, but you

> might find the tips on the above page helpful. If you're running from
> the command line, try using the -TJ extension, which will distinguish
> two kinds of
> failure: failure to load the assembly containing your class, and
failure
> to find the method that you want to call.
>
> There's also some advice on the Saxon Wiki at
>
> http://saxon.wiki.sourceforge.net/CallingDotNet
>
> (but I guess you've been there, it looks as if that's where the idea
of

> Namespace.ClassName may have come from...)
>
> Michael Kay
> http://www.saxonica.com/
>
>>
>> I receive the following error:
>>
>> Cannot find a matching 1-argument function named
>> {clitype:Namespace.ClassName?ACM=testFunction}returnDate()
>>
>> I could not find any good examples to help me trouble shoot my
>> problem.
>> My compliled .dll file is in the same folder as the saxon9.dll.
>>
>>
>> Here is my XSLT:
>>
>> <xsl:stylesheet version="1.0"
>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> xmlns:ACM="clitype:Namespace.ClassName?ACM=testFunction">
>> <xsl:output method="html"/>
>> <xsl:template match="/">
>> <html>
>> <head>
>> </head>
>> <body>
>> <xsl:for-each select="/root">
>> <h1>
>> <xsl:value-of
>> select="ACM:returnDate(member)"/>
>> </h1>
>> </xsl:for-each>
>> </body>
>> </html>
>> </xsl:template>
>> </xsl:stylesheet>
>>
>> Here is my class:
>>
>> Namespace ACM
>>     Public Class testFunction
>>
>>         Public Function returnDate(ByVal xslDate As String) As String
>>             Return xslDate
>>         End Function
>>
>>     End Class
>> End Namespace
>>
>> Here is my input:
>>
>> <?xml version="1.0" encoding="UTF-8"?> <root>
>> <member>2008-01-01</member> <member>2007-01-01</member> </root>
>>
>> Thanks,
>>
>> Phil
>
>
>
------------------------------------------------------------------------
> -
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness

> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/ 
> saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
------------------------------------------------------------------------
-
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness

> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/ 
> saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>

------------------------------------------------------------------------
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

_______________________________________________________________________
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the
material from any computer.

_____________________________________________________________________
This e-mail has been scanned for viruses by Verizon Business Internet
Managed Scanning Services - powered by MessageLabs. For further
information visit http://www.mci.com

------------------------------------------------------------------------
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

Re: .Net Extention

by Ryan Puddephatt-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The path in clitype:path

Should be the path to the class, so because you have

Namespace ACM
    Public Class testFunction

the path is ACM.testFunction

and clitype:ACM.testfunction

clear?

asm is a keyword which can go after path and specify a uri to the dll
containing the file (if the dll isn't local)

e.g.

clitype:ACM.testfunction?asm=C:\path\to\my.dll

Does this help

Thanks

Ryan

-----------------------------------------------
Ryan Puddephatt
FIX Developer
Fidessa LatentZero
1 Alfred Place
London WC1E 7EB
Office: +44 (0) 20 7462 4200
Direct: +44 (0) 20 7323 6112
Blackberry: +44 (0) 79 8539 2458
Fax: +44 (0) 20 7462 4242
Email: rpuddephatt@...
Web: http://www.latentzero.com


-----Original Message-----
From: saxon-help-bounces@...
[mailto:saxon-help-bounces@...] On Behalf Of Vallone,
Philip Mr CTR USA AMC
Sent: 11 July 2008 18:10
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] .Net Extention

Thanks Ryan,

I am a bit confused. This is what I have so far.

Xslt:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ACM="clitype:asm.testFunction">
        <xsl:output method="html"/>
        <xsl:template match="/">
                <html>
                        <head>
                        </head>
                        <body>
                                <xsl:for-each select="/root">
                                        <h1>
                                                <xsl:value-of
select="ACM:returnDate(member)"/>
                                        </h1>
                                </xsl:for-each>
                        </body>
                </html>
        </xsl:template>
</xsl:stylesheet>

Class:

Namespace ACM
    Public Class testFunction

        Public Shared Function returnDate(ByVal xslDate As String) As
String
            Return xslDate
        End Function

    End Class
End Namespace

What should it be?

Thx



-----Original Message-----
From: saxon-help-bounces@...
[mailto:saxon-help-bounces@...] On Behalf Of Ryan
Puddephatt
Sent: Friday, July 11, 2008 1:05 PM
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] .Net Extention

Also your namespace path isn't correct

Namespace ACM
   Class testFunction

Should translate to

ACM.testFunction

-----------------------------------------------
Ryan Puddephatt
FIX Developer
Fidessa LatentZero
1 Alfred Place
London WC1E 7EB
Office: +44 (0) 20 7462 4200
Direct: +44 (0) 20 7323 6112
Blackberry: +44 (0) 79 8539 2458
Fax: +44 (0) 20 7462 4242
Email: rpuddephatt@...
Web: http://www.latentzero.com


-----Original Message-----
From: saxon-help-bounces@...
[mailto:saxon-help-bounces@...] On Behalf Of Joe
Fawcett
Sent: 11 July 2008 18:02
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] .Net Extention

The URL has split:

http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm
l

Joe
http://joe.fawcett.name
--------------------------------------------------
From: "Vallone, Philip Mr CTR USA AMC" <Philip.Vallone@...>
Sent: Friday, July 11, 2008 5:58 PM
To: "Mailing list for the SAXON XSLT and XQuery processor"
<saxon-help@...>
Subject: Re: [saxon] .Net Extention

> Thanks Michael,
>
> Running from the command line with -TJ, I get
>
> Loading clitype:asm.testFunction
> No Java class clitype:asm.testFunction could be loaded Failed to load
> type asm.testFunction: Could not load type 'asm.testFunction' fro m
> assembly 'saxon9, Version=9.0.0.6, Culture=neutral,
> PublicKeyToken=e1fdd002d50 83fe6'.
> Error on line 11 of file:///C:/sandbox/saxon_ext/test.xslt:
>  Cannot find a matching 1-argument function named
> {clitype:asm.testFunction}ret
> urnDate()
> Transformation failed: Run-time errors were reported
>
> Also I was  unable to get to:
>
http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm

> l
>
> It looks like it was down.
>
> Thanks,
>
>
> Philip Vallone
> Web Developer
> General Dynamics Information Technology
> (732) 532-6997
> Philip.Vallone@...
>
>
> -----Original Message-----
> From: saxon-help-bounces@...
> [mailto:saxon-help-bounces@...] On Behalf Of Michael

> Kay
> Sent: Friday, July 11, 2008 12:17 PM
> To: 'Mailing list for the SAXON XSLT and XQuery processor'
> Subject: Re: [saxon] .Net Extention
>
>
> Firstly, it should be
>
> xmlns:ACM="clitype:ACM.testFunction"
>
> (In the documentation, Namespace.Classname is a placeholder for you to

> substitute your own namespace and your own classname.)
>
> Anything after the question mark is to help with the dynamic loading
of
> the assembly, and this starts to get very configuration-dependent. If
> your .dll file is in the same directory as the .exe used to launch
your
> application, then the above should be enough on its own. (Putting it
in
> a folder with other .dll's is no use.) Alternatively, creating a
> reference from your application to the assembly containing the
extension
> function should work.
>
> I don't know where you got the idea of writing ?ACM=testFunction. The
> list of query parameters that Saxon recognizes in the namespace URI is

> at
>
>
http://www.saxonica.com/documentation/extensibility/dotnetextensions.htm
> l
>
> (and "ACM" isn't one of them).
>
> Dynamic loading on .NET can be tricky to get working properly, but you

> might find the tips on the above page helpful. If you're running from
> the command line, try using the -TJ extension, which will distinguish
> two kinds of
> failure: failure to load the assembly containing your class, and
failure
> to find the method that you want to call.
>
> There's also some advice on the Saxon Wiki at
>
> http://saxon.wiki.sourceforge.net/CallingDotNet
>
> (but I guess you've been there, it looks as if that's where the idea
of

> Namespace.ClassName may have come from...)
>
> Michael Kay
> http://www.saxonica.com/
>
>>
>> I receive the following error:
>>
>> Cannot find a matching 1-argument function named
>> {clitype:Namespace.ClassName?ACM=testFunction}returnDate()
>>
>> I could not find any good examples to help me trouble shoot my
>> problem.
>> My compliled .dll file is in the same folder as the saxon9.dll.
>>
>>
>> Here is my XSLT:
>>
>> <xs