Arthur,

The problem is that you cannot pass the location of the XSLT file on the command line, it doesn't work.

There are 2 ways to pass the location of the XSLT:
 * Passing a _template parameter to the URL.
 * By setting the runtime properties (meaning in the xins.properties). Note that the value is then the directory where the XSLT is located. Then the name of the file should be the same as the function.
http://xins.sourceforge.net/docs/ar01s20.html#N10BF1

This AJAX example also uses the XSLT calling convention:
http://xins.users.mcs2.netarray.com/myproject/callMetaFunctions.html

Anthony

arthur wrote:
I download XINS 1.3.0 today and following the Primer sample to setup our my
test. Thanks Ernst's details instructions, everything went really smoothly.

Instead of changing my system path for Java/Ant/Xins as in step 2/5/9, I was
running a bat in dos window under the Xins home dir. Looks it works for me.

echo Run this from your XINS home dir.
set JAVA_HOME=C:\Progra~1\java\jdk1.5.0_03
set ANT_HOME=D:\apps\apache-ant-1.6.5
set XINS_HOME=%CD%
set path=%JAVA_HOME%\bin;%ANT_HOME%\bin;%XINS_HOME%\bin;
cd myProject

Now I am adding XSLT support to MyAPI
1) impl.xml
<calling-convention name="_xins-xslt" />

2) add page1.xslt under myproject\apis\myApi\spec

<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="/">
     <h1>
          <xsl:value-of select="//param"/>
     </h1>
     <h2>
          <xsl:value-of select="//greeting"/>
     </h2>
</xsl:template>
</xsl:stylesheet>

3) restart Xins as
"xins -Dorg.xins.server.config=xins.properties -Dtemplates.callingconvention
.source=myproject\apis\myApi\spec\page1.xslt run-MyAPI
"

But I still see the xml in my browser. I believe something is wrong in my
xslt (Being lazy again, I grab a sample from internet without understanding
the syntax :-( )

Then what is wrong?

Thanks,

Arthur

----- Original Message ----- 
From: "Ernst de Haan" <wfe.dehaan@gmail.com>
To: "arthur" <mail2arthur@gmail.com>
Cc: <xins-users@lists.sourceforge.net>
Sent: Monday, April 10, 2006 3:36 PM
Subject: Re: [Xins-users] xins client question


Arthur,


  
I don't want install JRE on the client side. If I code a cpp GUI to
    
collect
  
user input then I need a cpp http client lib to make the call to XINS. Any
good (and simple as XINS) cpp client recommand?
    

What exactly are you trying to do? And what is your client
environment? Are you going to develop a client (Windows?) application,
e.g. using Visual C++ or are you going to develop a server-side
application that will produce HTML?

  
If I use a web browser as client, then how can I config XINS to let the
    
user
  
see the response in a web page instead of xml? As my understanding, I need
    
a
  
css to map the xml to xdoc. I that true. My server response is always
    
simple
  
as "Well done, this take me 5s" or "Invalid input".
    

You have a host of options:

- Use CSS on the returned XML (bad idea)
- Configure the XSLT calling convention and write some XSLT (see user guide)
- Use the new XINS frontend framework (see PetStore example in XINS 1.4)
- Write a custom calling convention (see user guide)

The right choice depends on what you want, exactly... Could you elaborate?

Regards,


Ernst



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Xins-users mailing list
Xins-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xins-users