Based on my conscience, I prefer the element  ... and

[uri=""] | [uri-expression="${protocol}://${host}[:${port}][${path}]"] |
[path-regex="regex"]/

When I saw the above content. I just noticed that there is a little bit
redundancy in uri, path, etc … So , I just researched for finding
information on XML element vs attribute as I did not have good knowledge
with the XML based language design. Based on those, I feel that the element
is more suitable [the article itself describe many reasons].  I had also
read some information in DSL some time earlier… based on those , a correctly
used element can make a language API fluent than an attribute and make more
friendly for a user. E.g.

<man>

    <eat>rice </eat>

</man>

Vs

<man action=”eat” value=”rice”/>

I always prefer the first one as a user and may be like the second one as a
developer.

BTW, I am not (-) on the attribute if many one like it.

Thanks

Indika

Reply via email to