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
a12333ee
Commit
a12333ee
authored
Feb 28, 2010
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assorted code cleanup for contrib/xml2. No change in functionality,
just make it a bit less ugly in places.
parent
bd7246f6
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
134 additions
and
170 deletions
+134
-170
contrib/xml2/xpath.c
contrib/xml2/xpath.c
+124
-160
contrib/xml2/xslt_proc.c
contrib/xml2/xslt_proc.c
+10
-10
No files found.
contrib/xml2/xpath.c
View file @
a12333ee
This diff is collapsed.
Click to expand it.
contrib/xml2/xslt_proc.c
View file @
a12333ee
/*
* $PostgreSQL: pgsql/contrib/xml2/xslt_proc.c,v 1.1
6 2009/07/10 00:32:00
tgl Exp $
* $PostgreSQL: pgsql/contrib/xml2/xslt_proc.c,v 1.1
7 2010/02/28 19:51:37
tgl Exp $
*
* XSLT processing functions (requiring libxslt)
*
...
...
@@ -27,17 +27,17 @@
#include <libxslt/xsltutils.h>
/* externally accessible functions */
Datum
xslt_process
(
PG_FUNCTION_ARGS
);
/* declarations to come from xpath.c */
extern
void
elog_error
(
int
level
,
char
*
explain
,
int
force
);
extern
void
pgxml_parser_init
();
extern
xmlChar
*
pgxml_texttoxmlchar
(
text
*
textstring
);
extern
void
elog_error
(
const
char
*
explain
,
bool
force
);
extern
void
pgxml_parser_init
(
void
);
/* local defs */
static
void
parse_params
(
const
char
**
params
,
text
*
paramstr
);
Datum
xslt_process
(
PG_FUNCTION_ARGS
);
#define MAXPARAMS 20
/* must be even, see parse_params() */
...
...
@@ -80,7 +80,7 @@ xslt_process(PG_FUNCTION_ARGS)
if
(
doctree
==
NULL
)
{
xmlCleanupParser
();
elog_error
(
ERROR
,
"error parsing XML document"
,
0
);
elog_error
(
"error parsing XML document"
,
false
);
PG_RETURN_NULL
();
}
...
...
@@ -94,7 +94,7 @@ xslt_process(PG_FUNCTION_ARGS)
{
xmlFreeDoc
(
doctree
);
xmlCleanupParser
();
elog_error
(
ERROR
,
"error parsing stylesheet as XML document"
,
0
);
elog_error
(
"error parsing stylesheet as XML document"
,
false
);
PG_RETURN_NULL
();
}
...
...
@@ -109,7 +109,7 @@ xslt_process(PG_FUNCTION_ARGS)
xmlFreeDoc
(
doctree
);
xsltCleanupGlobals
();
xmlCleanupParser
();
elog_error
(
ERROR
,
"failed to parse stylesheet"
,
0
);
elog_error
(
"failed to parse stylesheet"
,
false
);
PG_RETURN_NULL
();
}
...
...
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