Hey, welcome back. Nice to see you made it through the first part of the tutorial! If you didn’t read that yet, I’d recommend you to do so—it introduces some important concepts.
We’ll talk about the basic PyXWF nodes, which are redirect, directory and page. Those are actually doing exactly what you’d expect. Also we’ll talk about navigations (which are really easy business with PyXWF).
To give this all a more aimed touch, we’ll imagine the following situation. We want to start a community website, where we have some projects which we want to display status of. We also want a small blog where people can post about their projects. That sounds a lot? It’s actually pretty easy to acomplish. In this section, we’ll start with adding generic information about our community.
We before had the following sitemap tree:
<dir:tree
id="treeRoot"
template="templates/default.xsl">
<page:node name="" id="home"
src="home.xml"
type="application/x-pywebxml" />
</dir:tree>
Footnotes
[1] | Why XHTML? XHTML is a reasonable (the only, if you’d ask me) way to represent HTML data. The great advantage we get from using XHTML content internally is that we have a coherent document tree, can embed XHTML in other formats (PyWebXML for example) and apply XSL transformations to it. But you know what’s even better? PyXWF makes sure browsers can read your XHTML! It’ll downconvert it to HTML whenever neccessary, by using Content Negotiation and wild guesses about the User Agent. |