W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > November 2010

RE: Document template test 10

From: <vojtech.toman@emc.com>
Date: Thu, 18 Nov 2010 03:33:13 -0500
Message-ID: <997C307BEB90984EBE935699389EC41C02B2E3C7@CORPUSMX70C.corp.emc.com>
To: <public-xml-processing-model-wg@w3.org>
> If we say the latter : we can have }} inside } irrespective to the
> fact that it's in a string or anything else we could rewrite the first
> example as
> { concat('{{', /doc/p, '}}') }
> 
> And I will be perfectly happy this way
> 
> So let's go for this parsing rules
> 
> Normal mode
> 1) IF you parse {{ then output {
> 2) IF you parse }} then output }
> 3) IF you parse { then switch to 'xpath mode'
> 4) IF you parse } then it's an error
> 5) IF you parse anything else output it as is
> 
> Xpath mode
> 1) IF you parse {{ then output {
> 2) IF you parse }} then output }
> 4) IF you parse { then it's an error
> 3) IF you parse } then switch to 'normal mode' and evaluate the string
> in the buffer as the xpath expression
> 5) IF you parse anything else output it as is
> 
> Mohamed

OK, so if you want to output "{" /doc/p "}", you will have to use
concat():

{{{concat(/doc/p, '}}')}

or: {concat('{{', /doc/p, '}}')}

I think that is reasonable.


Vojtech


--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech
Received on Thursday, 18 November 2010 08:34:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 18 November 2010 08:34:41 GMT