Well if you REALLY want to know...  My original code.py extracted and
listed all the XML results files within a given directory.  The next
step was to extract out certain pieces of information from each file
and print them next to the first list.  It seemed to me I could not do
much with the template aside from looping through sets and printing
out variables.  My next thought was to create dictionaries within
code.py and pass them to the template.  Then I figured rather than
passing a number of dicts to the template I could have all my stuff
stored in an XML document in memory and pass it that way.  Then the
template would use XSLT to make the passed content look pretty.

I'm sure you could tell at this point I'm pretty green with this
stuff.  Any ideas or best practices would help alot!  Thx.

 - Joe

On Apr 7, 4:02 pm, "Yoan Blanc" <[EMAIL PROTECTED]> wrote:
> What's the point here? Do you really need to use files served by the
> web server to do XSL Transformations?
>
> Best of luck.
>
> -- Yoan
>
> On Mon, Apr 7, 2008 at 9:55 PM, Joe Tseng <[EMAIL PROTECTED]> wrote:
> > Thanks to the list for the help earlier...  Now I'm trying to apply an XSLT
> > document to the generated XML and nothing seems to show up.  I suspect if it
> > worked as it's supposed to you'd see two code 200 msgs in STDOUT - one for
> > the XML itself and one for the XSLT document.  So far I'm only getting one
> > and I can see the contents of my XSLT doc only if I look directly at it with
> > the browser.  Is this something else that is blindingly obvious for others?
>
> > My code.py is as follows:
>
> > urls = (
> >     "/", "index",
> >     "/main.xsl", "xslmain"
> > )
> > ...
> >         xmlstr = "<?xml version=\"1.0\"
> > encoding=\"UTF-8\"?>\n<?xml-stylesheet type=\"text/xsl\"
> > href=\"./main.xsl\"?>\n"
> >         xmlstr = xmlstr + etree.tostring(runlist, pretty_print=True)
> > ...class xslmain:
> >     def GET (self):
> >         web.header("Content-Type","text/xml; charset=utf-8")
> >         print open("templates/main.xsl").read()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to