[Petal] Scoping changes

Jean-Michel Hiver jhiver at mkdoc.com
Sat Feb 1 14:00:44 GMT 2003


On Fri 31-Jan-2003 at 12:49:12PM -0500, William McKee wrote:
> Hi Jean-Michel,
> 
> I started using XIncludes in v0.82. Today, I updated to 0.83 and some of
> templates starting to break because of directory locations. Was this
> intentional?

Ooops, I broke backwards compatibility without even realizing it!

In my head, old 'include' stuff was writen as follows:
(notice the beginning slash...)

  <?include file="/includes/foo.xml"?> 

And not as:

  <?include file="includes/foo.xml"?>

Foolish foolish!


Basically this behavior IS intentional, it is so that you can use
relational path as well as absolute path...

I can see here two options:

a) Leave it as it is and break backwards compatibility

b) Change it so that any relative path MUST start with a dot, i.e.

  <xi:include href="./bits/foo.xml" />
  <xi:include href="../included_stuff/foo.xml" />


I prefer option b), I'd rather keep backwards compatibility if I can.
What do others think?
-- 
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
jhiver at mkdoc.com  - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/



More information about the Petal mailing list