XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] RE: Should the XPath working group add support for animport capability?

On Mon, Jan 14, 2013 at 6:45 AM, David Lee <dlee@calldei.com> wrote:
> IMHO ...
> XPath is not intended as a fully featured language but rather a common expression vocabulary.

Yes, there is a substantial difference in what XPath was intended to
be and what XPath 3.0 actually is. Roger's recent work shows that one
can have useful libraries of XPath - defined functions, that are
independent of any host language and thus fully portable across host
languages. And complete XPath applications (programs) are also
possible.

Why should one store such Xpath in (at least) two different files --
one for XSLT and one for XQuery?

Why should one spend more time in doing this and create more
inconvenience to everybody?

Why should one have to maintain these at least two representations of
the same XPath code?

Why should one bear with syncronization problems and, at some time ,
having inevitably out of sync XSLT and XQuery representations, and
having to apply effort even to determine which is the newest one, or
if both have evolved independently and need a (non-trivial) merge?

> Any XPath expression is a valid XQuery program.

But XPath is intended to be used not only as a subset of XQuery.

For example, implanting XPath code into XSLT requires some additional
effort and discipline.


Cheers,

Dimitre

>
> ----------------------------------------
> David A. Lee
> dlee@calldei.com
> http://www.xmlsh.org
>
> -----Original Message-----
> From: Costello, Roger L. [mailto:costello@mitre.org]
> Sent: Monday, January 14, 2013 9:12 AM
> To: xml-dev@lists.xml.org
> Subject: [xml-dev] Should the XPath working group add support for an import capability?
>
> Hi Folks,
>
> The new functionality in XPath 3.0 is very exciting.
>
> With its new functionality one can create powerful XPath data structures, functions (unfortunately not libraries, see below) and programs -- all written in pure XPath.
>
> Since XPath is highly portable the programs can be dropped into any language that hosts XPath - XSLT, XQuery, Java, Perl, Python, etc.. That is fantastic. Write once and reuse many times.
>
>     Imagine a function library developer
>     able to write just one set of functions,
>     not two. The developer would save a
>     massive amount of time and could use
>     these savings in writing more functions
>     in the library -- a bonus to everyone.
>
> There is one problem, however.
>
> The XPath programs must be monolithic (not modular). One cannot write program A and then reuse it (import it) into program B.
>
>     The current W3C XPath 3.0 specification
>     does not include support for an "import"
>     clause.
>
> That non-modularity of XPath limits its usefulness.
>
> I would like to see the XPath working group add modularity to the XPath language.
>
> Here are the advantages to doing so:
>
> 1. Develop once, reuse often. That results in time and cost savings.
>
> 2. Computer Scientist John Hughes, in his famous paper "Why Functional Programming Matters" argues that "modularity is the key to successful programming." Greater modularity in XPath would yield more successful programs.
>
> Here are the disadvantages to doing so:
>
> 1. It makes the language bigger. Vendors are less inclined to support XPath if it is too big.
>
> 2. It is not in the XPath working group's requirements.  A new use-case / requirement would have to be inserted into the XPath requirements / use-cases.
>
> What do you think, should the XPath working group add support for modularity (i.e., add support for an import capability)?
>
> If yes, now is the time to speak up. Also, if yes, should the XPath working group add it to 3.0 or 3.1?
>
> /Roger
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>
>
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS