Re: Postgresql 8.4, XPath and name() function

Поиск
Список
Период
Сортировка
От Tim Landscheidt
Тема Re: Postgresql 8.4, XPath and name() function
Дата
Msg-id m3oceagiab.fsf@passepartout.tim-landscheidt.de
обсуждение исходный текст
Ответ на Postgresql 8.4, XPath and name() function  (ced45 <cedric.duprez@ifn.fr>)
Список pgsql-general
Craig Ringer <craig@postnewspapers.com.au> 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

В списке pgsql-general по дате отправления:

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Idle In Transaction
Следующее
От: David Kerr
Дата:
Сообщение: constraint/rule/trigger - insert into table X where not in table Y