Re: [xslt] native C functions

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" 

<xsl:template match="middle-school">
<xsl:if test="@class=homeroom"
<xsl:apply-templates select="myFunc:roomName()"/>

example xml

  <room class="homeroom">Mr. Moore</room>
  <room class="math">Ms. Moore</room>

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
runtime error: file test.xsl line 23 element copy
xsltApplyOneTemplate: loop found ???
try increasing xsltMaxDepth (--maxdepth)
#0 name room
#1 name room


--- 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.
> > 
> >
> > 
> > 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 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]