Search Postgresql Archives

Re: Postgresql 8.4, XPath and name() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Craig Ringer <craig@xxxxxxxxxxxxxxxxxxxxx> wrote:

> [...]
>>> I would like to get "unit", but I just get an empty array ({}).
>>> How can I get "unit" ?

>> AFAIK, this is not related to PostgreSQL, but inherent to
>> XPath in that it returns elements from the document that
>> fulfill the XPath expression *unchanged*.

> My (poor) understanding is that XPath can be used as an
> expression language and as a selector specifier language.
> You can observe this in XSLT, where

> <xsl:template match="some-xpath"/>

> uses XPath as a selector of elements, and:

> <xsl:value-of select="some-xpath"/>

> uses XPath as an expression language, returning the output
> of a given XPath expression or function not just the
> "matched"/"not matched" status.

> I found this very confusing myself when learning XSLT, and
> it's possible I'm still misunderstanding it somewhat, but
> it's clear that XPath can be used in more than one way.
> [...]

Okay, that's maybe due to my XML socialization: An XPath ex-
pression to me has always been something you use in
"xsl:template" and "xmllint --shell", as in "xsl:value-of" &
Co. you have also access to other functions. It's even in
the specification :-):

| [...]                                   The primary purpose
| of XPath is to address parts of an XML [XML] document. [...]

(from: <URI:http://www.w3.org/TR/xpath/>)

Tim


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux