List Info

Thread: Re: TransitionMLS scenario




Re: TransitionMLS scenario
user name
2008-03-26 03:12:55
On 24 mrt 2008, at 11:00, marcinmilanxaraya.com wrote:

[re-arranged a bit]

1. what do we do about text nodes we don't want translated,
such as  
javascript, css or the stuff inside the <pre> tag?
2. what children do we allow for the xar:set tag?
3. where should #...# syntax be allowed?

First, these questions are generic, not specific for the
scenario,  
right?

Ad. 1.
In the proposal on MLS changes i wrote a while ago, i
proposed the  
xml:lang attribute for this.
A good read on this attribute is here: http://www.opent
ag.com/xfaq_lang.htm

Of course the definition "this content is in this
language" and "dont  
translate this" is not the same statement in general.
The first is the  
statement in XML by the xml:lang attribute. The second is
how the XML  
handlers "reacts" on this statement (in our case,
BL2 compiler)

Ad. 2
The xar:set tag has to be redesigned completely. It is now a
fallback  
to get anything done in a template we can not express neatly
in our  
templating language. The compiled variety expects anything
inside the  
tag to evaluate to "Something assignable" (PHP
wise).  "Something  
assignable" in XML has a different meaning than in PHP.
We should  
solve this bit step by step imo. Until we reach some
threshold where  
the BL language is more expressive, xar:set will be around i
think.  
This is on many levels related to the third question.

Ad. 3
The #...# syntax is used as an 'escape' mechanism to
formulate  
expression in the XML where we dont have a XML mechanism to
do this  
for us. As such, the question where it is allowed is fuzzy,
because it  
aint treated as part of the XML. Anything we come up with we
need to  
implement ourselves. Again i think we should take this one
at a time.

#$test# is already equivalent to <xar:var
name="test"/>

the latter is treated integrally in the BL compiler, the
first needs  
preprocessing hack to make it XML first ( in this case
creating a  
processing instruction with the php target)

For me the obvious long term route is first to offer the
data to  
templates as an XML nodeset/fragment instead of a PHP array
and then  
use XPath as the expression language to query and manipulate
that  
data. If that route is acceptable for others, i dunno. Going
that  
route solves the '#' symbol discussion which every now and
then seems  
to pop up. It also solves the 'domain mixing' problems we
have  
introduced (see xar:set, xar:ml expresssions xar:if
conditions etc.)  
It creates a while new set of problems though.

I've done some work on the first part (offering tpl data as
XML  
nodeset) but this is still experimental. XML in general and
XPath in  
particular support is much better now than at the time BL1
saw the  
light.

marcel

-- 
Marcel van der Boom -- http://hsdev.com/mvdb.vcf
HS-Development BV   -- http://www.hsdev.com
So! webapplicaties  -- http://make-it-so.info



_______________________________________________
Xaraya_devel mailing list
Xaraya_develxaraya.com
http:
//xaraya.com/mailman/listinfo/xaraya_devel

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )