[Petal] XIncludes problem and question

William McKee william at knowmad.com
Fri Feb 14 10:07:49 GMT 2003


On Fri, Feb 14, 2003 at 02:29:42PM +0000, Jean-Michel Hiver wrote:
> I hope this simple example clears things up a little bit.
> Or maybe I'm just all messed up myself :)

That does help and even makes sense <g>. There were lots of other bits
including references to schemas in the article I was reading last night.


> It is not legal XML to have '<' in a text section.
> However it is legal to have '>' in a text section.

Oh, I didn't realize that. It seems odd that one is valid and the other
is not as they both seem to be of the same character type. I trust that
there is a good reason, though.


> Your example causes a problem because of Javascript...

Yeah, I know how much you like JavaScript <g> and don't expect you to
change Petal. I was just wanting to point out what looked to me like an
anomaly in how Petal was including external files. In the example I
sent, is the '<' getting replaced because Petal (or XHTML or whatever is
processing this included files) see that it is contained within quotes?
All the other < characters come through clean.


> What you might want to do is export all your javascript functions in a
> '.js' file which you can import, and then use only simple javascript
> function calls inside your HTML file...

I do that in most cases. The example I submitted has an inline
document.write function that wouldn't work well in an external file (I
don't think).


> <zealot>Or you could avoid using JavaScript :)</zealot>

And I might just do that! The header that I'm trying to include was not
created by me. For some reason, they are using JavaScript to set a size
attribute for an text input element.


Thanks for your help,
William

-- 
Knowmad Services Inc.
http://www.knowmad.com



More information about the Petal mailing list