[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    XForms & ASP (was: The Template Toolkit )
From:       Dmitry Beransky <dberansky () ucsd ! edu>
Date:       2000-07-31 18:54:06
[Download RAW message or body]

I'm still pretty vague on where I want to go with this myself :).  Just 
bits and pieces of ideas.  Last night I tried to put something together, 
though, and ran into a strange problem which I can't figure out how to 
solve.  Perhaps, you may have a suggestion, Joshua (the xform markup's 
taken directly from w3c's side):

Here's my sample ASP file:

<%@language="PerlScript"%>
<%
    use XML::DOM;
    use XML::XPath;
    my ($xform,$xform_xpath);
%>
<html>
<head>
<xform xmlns="http://www.w3.org/2000/xforms"
   action="http://www.my.com/cgi-bin/receiver.pl"
   method="postXML"
   id="po_xform">
   <model>
     <group name="purchaseOrder">
       <group name="shipTo">
         <string name="name"/>
         <string name="street"/>
         <string name="city"/>
         <string name="state"/>
         <string name="zip">
           <mask>ddddd</mask>
         </string>
       </group>
     </group>
   </model>
</xform>
</head>
<body>
    <h1>Form</h1>

    <form id="po_xform"/>
    <form/>
</body>
</html>

<%
sub form
{
}

sub xform
{
    my ($attributes, $body) = @_;
    my $parser = new XML::DOM::Parser;

    $body =~ s/\n//mgs;
    $body = "<xform>$body</xform>";
    $Response->Write($body );
}
%>

when I run this, I get the following error:

[Mon Jul 31 10:45:53 2000] (eval 76): String found where operator expected at
(eval 76) line 50, at end of line
[Mon Jul 31 10:45:53 2000] (eval 76):   (Missing operator before ?)
[Mon Jul 31 10:45:53 2000] [error] [asp] [605] [error] [Mon Jul 31 10:45:53 20
00] (eval 76): Can't find string terminator "'" anywhere before EOF at (eval 7
6) line 50. <--> , /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 1740

It doesn't look like I have any runaway strings, so any idea what gives?

Thanks
Dmitry

At 09:01 PM 7/29/00, Joshua Chamas wrote:
>If you could tell me more about this sometime, like where you
>are going with this, and how this might be brought into the
>server to ease developer use that would be great.  Its still
>takes a bit to get my head around XML ways of looking at things.
>Dmitry Beransky wrote:
> >
> > That's where the XForm may come quite handy
> > (<http://www.w3.org/MarkUp/Forms/>).  The specification is still been
> > worked on, but it has some parts that can already be used on the back
> > end.  I can see it (me thinks) fit quite nicely into Apache::ASP XML
> > processor.  I thought about coding it up, but never got the time.
> >

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic