Re: [xslt] native C functions
- From: James <munch1e02 yahoo com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] native C functions
- Date: Wed, 27 Oct 2004 06:25:43 -0700 (PDT)
OK, I have reviewed and was checking the mailing list
to try to piece together more knowledge in the aspect
of extensions.
In my XSL file I want to do something like this:
<xsl:stylesheet version="1.0"
xmlns:myFunc="http://whatever"
extension-element-prefixes="myFunc">
<xsl:template match="middle-school">
<xsl:if test="@class=homeroom"
<xsl:copy>
<xsl:apply-templates select="myFunc:roomName()"/>
</xsl:copy>
</xsl:if>
</xsl:templage>
example xml
<middle-school>
<room class="homeroom">Mr. Moore</room>
<room class="math">Ms. Moore</room>
</middle-school>
result set needed
<room class="homeroom">Room 5</room>
Such that roomName() will do some sort of table lookup
to find the name of the teacher and return back the
room number.
In my C program, I am making the following call:
xsltRegisterExtModuleFunction( "roomName",
"http://whatever", xsltRoomName );
The xsltRoomName simply prints "Room 5" to the screen
and then returns the string "Room 5".
Yet the resulting output says the following:
Room 5 (repeats quite a few times, I would est over
4000)
runtime error: file test.xsl line 23 element copy
xsltApplyOneTemplate: loop found ???
try increasing xsltMaxDepth (--maxdepth)
Templates:
#0 name room
#1 name room
.
.
.
Variables:
Thanks,
James
--- James <munch1e02 yahoo com> wrote:
> --- Daniel Veillard <veillard redhat com> wrote:
>
> > On Tue, Oct 26, 2004 at 07:07:32AM -0700, James
> > wrote:
> > > I have been trying to 'google' for the answer to
> > my
> > > question. Can anyone help explain to me on how
> to
> > call
> > > native C functions from my XSLT? I am currently
> > using
> > > libxslt 1.1.11.
> >
> > http://xmlsoft.org/XSLT/extensions.html
> >
> > It's on the first page returned by google when
> > querying "libxslt extension"
> >
> > Daniel
> >
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]