By Date: <-- -->
By Thread: <-- -->

[XAR2] New implementation of Blocklayout compiler



Jason wrote:
> "Brian Bain" <xaraya (at) tefen.net> wrote in message 
>> This causes me some worry.  I've been playing with ajax on Xaraya quite a 
>> bit lately, and I've found that creating my own "ajax" templates seems to 
>> work pretty well.  The typical template may read like this:
>>
>> <screenElement1>
>>    <item id="123" value="Item 1" />
>>    <item id="234" value="Item 2" />
>> </screenElement1>
>> <screenElement2>
>>    <foo bar="bar1" />
>>    <foo bar="bar 2" />
>> </screenElement2>
>>
>> Does this change mean that I won't be able to do such a thing unless I 
>> define each screenElement and item and foo?
>
No problem, they just go through. The default behaviour of the 
compiler is to copy the input to the output if there is no specific 
match. We only match tags in the xar: namespace + comments (ignored) + 
processing-instructions (ignored). Everything else is copied (almost) 
verbatim. (there will be some whitespace normalisation etc., but this 
should not change behaviour nor structure. Unfortunately, we've 
already found 1 case where it does in (X)HTML rendering )

> I'd guess this would not be a problem. The above looks like well-formed XML, 
> so should pass through okay. It may not pass a validating parser, without a 
> matching DTD, but I think Marcel is talking about well-formed XML, rather 
> than validated XML, at this stage at least.
>
Both actually. Well formed XML is not a choice anymore, but a must. 
Without it, nothing works. Validation can be built up step by step. We 
have no structural requirements at this point. i.e. any tag can appear 
anywhere with any attribute (note: this is _input_ , validation of 
_output_ is a whole other game )

At least for part of the xar: namespace it makes sense to add some DTD 
rules (xar:else only makes sense as child of xar:if and xar:sec for 
example )

Previously it was useless to define it, because no part of the input 
chain would pay attention to it. This has changed now, so we can (and 
probably should) define a DTD for xar: now.

marcel
_______________________________________________
Xaraya_devel mailing list
Xaraya_devel (at) xaraya.com
http://xaraya.com/mailman/listinfo/xaraya_devel