Problem: Dependencies
published 28 July 2006
This time I have a problem, but no solution yet. It’s all about dependencies.
Let me just quickly describe what I am trying to think of:
I’ll have an XSL based CMS, where the templates are able to generate navigations by accessing the internal pagetree object (see this and this to see where I am coming from) unsing any XPATH command.
Let’s say I add a page somewhere in the tree. How do I figure out the dependencies of that change, which pages have changed and which haven’t, without rendering the output of each single page and looking for differences to the version before?
This becomes more and more important the larger the site gets, obviously.
So people, any smart ideas?
Comment
- Pascal,
I have long used an XML based topic map or page tree. I also used a depth attribute. But I also found that other “meta data” such as adding an id, created/updated dates to the pages were useful for me. That also allows me to have pages that introduce other pages to automatically take on the last updated date of the most recently updated child page.
I don’t know if that is what you are looking for?
In my case the dependency is strictly hierarchical. I don’t know if that is the case for you.
One though if your pages depend on pages throughout the tree, is to give each page an id, and perhaps if easy to manage have a list of dependent ids per page. Then, your pagetree has all this information at hand. With XSLT you can easily reference other pages if needed (you might even be able to use keys to speed up the lookup…)
— Anup Shah 28 July, 2:57pm # - Anup, I’m afraid it’s not as simple as that. Navigations could refer to ANY set of nodes expressed through ANY XPATH query, and not stricly hierachical like in your query.
Therefore it’s impossible to determine with other pages will be dependencies by just keeping track of ID’s that are lower in the hierarchy of the tree.
Also, given that the rendering of the HTML output is happening through XSLT, how can the XSLT itself keep track of what’s the latest element inserted without being called actually? The whole purpose of this is to figure out the dependencies in order to avoid unnecessary rendering, you see?
— Pascal 28 July, 3:18pm #
Quick links
Other people's articles that we think you might be interested in:
- Tracking Sub Domains with Google Analytics
- Google Webmaster Guidelines
- WordPress Gears
- Using conditional comments to target Outlook 2007 - Campaign Monitor Blog
- ~jk typesafe objects in PHP
Want to buy a cheap laptop for your design work? read laptop reviews at laptopical.com