[plt-scheme] Web programming .
I think the difference you're getting at is that because the PLT
template system is more powerful, there is less that you can do with
it externally. The PLT templates are not necessarily XML, so it
doesn't make sense to parse them and analyze them as if they were. PLT
templates are simple Scheme programs that when run produce the text
you want, but they have a convenient syntax (thanks to Eli primarily)
for primarily text documents.
If you wanted you could enforce upon yourself the restriction that
your templates were actually XML and parse them, but I'm still not
sure what you feel that that (or Genshi) would do for you.
Jay
On Sat, Dec 26, 2009 at 10:43 PM, Nevo <sakur.deagod at gmail.com> wrote:
> hi,
> Sorry, forgive me not able to clarify more on this topic . Here's the
> piece of code from the Genshi template file :
> <py:match path="body" once="true" buffer="false"><body>
> ${select('*|text()')}
> </body> </py:match>
>
> The above code is just instructing the template engine to *select* the
> text content of node "body" from the XHTML streams. That's the one I was
> asking actually. There's a difference between Genshi and PLT scheme web
> template from my point of view , the former separates the template macros
> and the real content streams ,while the latter combines the template macros
> (S-expressions) with the content. As suggested by Jay, I could use
> SXML/SXPATH library to parse the XHTML content and select those nodes which
> I'm interested in. Yeah, this is possible , but I havn't used that yet, on
> a quick read of its tutorial
> (http://modis.ispras.ru/Lizorkin/sxml-tutorial.html) , I probably need to
> obtain a SXML representation of a document which means the template file
> should be expanded first (using @include-template) and then parse it using
> SXML parser into a SXML document before I can use SXPath on it, am I right ?
> Or is there a way to do it in template file itself ? Thanks.
>
> Nevo
>
>
> Actually, I think you misunderstood.
>
> Tell us what you want and it may be pretty easy to do.
>
> On Sat, Dec 26, 2009 at 11:28 PM, Nevo <sakur.deagod at gmail.com> wrote:
>
>
> hi Todd:
> Yeah... your words sound like a style of education to me but useful
> (really appreciate) . Of course I will take the stabs at writing pieces of
> prototype and ask here for review. As currently I'm still on the way to
> fully understand and practice with the powerful PLT scheme web framework by
> means of building up my blog service , the quick follow up in this topic is
> just a curious wonder and hope not offending the underlying laws of this
> mailing list. I really want to contribute to this great community and be
> able to help others in exchange to the huge helps from here, but as you know
> my numb brain just tells me you should dig in it before you give any output
> ,as emphasized by you. So thanks anyway , I'll see what I would help in the
> future.
>
> Nevo
>
> On Sat, Dec 26, 2009 at 10:12 PM, Nevo <sakur.deagod at gmail.com> wrote:
>
>
>
> Yes, it's pretty useful and enjoyable to do web programming in plt scheme.
> But I just wonder any plan to continue to extend the powerness of Plt scheme
> web framework ? Like provide XPath select support in current HTML template
> system which I've been using in Genshi ( a python template component used
> in Trac (trac.edgewall.org) ? thanks .
>
> Nevo
>
>
>
> Assuming it works the way most other development in PLT has seemed to
> work, here's all you need to do:
>
> Step 1. Find a student who wants a Master's or Ph.D. in Computer Science.
>
> Step 2. Interest him/her in what you want.
>
> Step 3. Get him/her to interest a member of the PLT group as an advisor.
>
> Step 4. Wait for the goodies. :-)
>
> But seriously, I'm working with some of my (high school) students on a
> couple of PLT web apps and we're seeing things we wish we had and
> taking stabs at putting them together. If you can give examples of the
> kind of functionality you want and take stabs at writing parts of the
> code, this mailing list is incredibly good about helping you along.
>
> As someone who's gotten huge amounts of help on this list in exchange
> for a mere pittance of very basic help for the few people even more
> clueless than himself, my suggestion is dig in, start writing, ask for
> help, and before you know it, you'll have what you always wanted.
>
> Todd
>
>
>
>
>
>
>
--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay
"The glory of God is Intelligence" - D&C 93