Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
e6a7416e
Commit
e6a7416e
authored
Jul 03, 2010
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document more clearly on XML namespaces inside xpath function
Nikolay Samokhvalov
parent
da254e3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
doc/src/sgml/func.sgml
doc/src/sgml/func.sgml
+19
-3
No files found.
doc/src/sgml/func.sgml
View file @
e6a7416e
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.52
0 2010/06/29 22:29:13
momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.52
1 2010/07/03 17:21:48
momjian Exp $ -->
<chapter
id=
"functions"
>
<chapter
id=
"functions"
>
<title>
Functions and Operators
</title>
<title>
Functions and Operators
</title>
...
@@ -8610,8 +8610,11 @@ SELECT xmlagg(x) FROM (SELECT * FROM test ORDER BY y DESC) AS tab;
...
@@ -8610,8 +8610,11 @@ SELECT xmlagg(x) FROM (SELECT * FROM test ORDER BY y DESC) AS tab;
mappings. This array should be a two-dimensional array with the
mappings. This array should be a two-dimensional array with the
length of the second axis being equal to 2 (i.e., it should be an
length of the second axis being equal to 2 (i.e., it should be an
array of arrays, each of which consists of exactly 2 elements).
array of arrays, each of which consists of exactly 2 elements).
The first element of each array entry is the namespace name, the
The first element of each array entry is the namespace name (alias), the
second the namespace URI.
second the namespace URI. It is not required that aliases provided in
this array are the same that those being used in the XML document itself (in
other words, both in the XML document and in the
<function>
xpath
</function>
function context, aliases are
<emphasis>
local
</>
).
</para>
</para>
<para>
<para>
...
@@ -8624,6 +8627,19 @@ SELECT xpath('/my:a/text()', '<my:a xmlns:my="http://example.com">test</my:a>',
...
@@ -8624,6 +8627,19 @@ SELECT xpath('/my:a/text()', '<my:a xmlns:my="http://example.com">test</my:a>',
--------
--------
{test}
{test}
(1 row)
(1 row)
]]>
</screen>
</para>
<para>
How to deal with default (anonymous) namespaces:
<screen>
<![CDATA[
SELECT xpath('//mydefns:b/text()', '<a xmlns="http://example.com"><b>test</b></a>',
ARRAY[ARRAY['mydefns', 'http://example.com']]);
xpath
--------
{test}
(1 row)
]]>
</screen>
]]>
</screen>
</para>
</para>
</sect2>
</sect2>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment