I vote for declaring xpath as a String, because I know many developers
have problems with double-quoting things.
Just take <basevaluecomponent> with its "value"-field which is also
declared as expression. If you perform a search on the forum for
problems with "value", you'll get a dozen of threads, because people
don't know they must double-quote strings for this field.
And I think it's confusing for users to remember to use a double-quoted
xpath for <replicator>, but a single-quoted xpath for <datapointer>. The
same goes for the various "itemdatapath", "contentdatapath" fields on
components. So, almost everywhere you need to use a single-quoted xpath.
That'd be a huge break to be forced to write double-quotes...
Additionally, if you ever need to have a computed xpath, you can use
i.e. an "once-constraint".
André
P T Withington wrote:
Because I made it be an expression, so you could have a computed
xpath. If that is not useful, we can change it to a String.
On 2007-09-03, at 18:25 EDT, Sarah Allen wrote:
thanks! hmmm.... why is xpath declared with double quotes:
<replicator name="foo"
dataset="mydata"
xpath="'/product/'">
?
P T Withington wrote:
I put them in tests/explicit-replicators
On 2007-09-03, at 17:33 EDT, Sarah Allen wrote:
Are there existing test for explicit replication? I don't see
anything in /wafflecone/test/data that seems like it would cover
that based on filenames...
Thanks,
Sarah
--
Official OpenLaszlo-Committer ^_^