[Yum-devel] [PATCH 6/5] Prefix additions and removals with the 'delta' namespace
James Bowes
jbowes at redhat.com
Tue Jun 26 13:57:56 UTC 2007
---
This just adds a new xml namespace for additions/removals, rather than
polluting the original repository metadata namespaces.
xml-parser.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/xml-parser.c b/xml-parser.c
index 695b90d..66a1d4b 100644
--- a/xml-parser.c
+++ b/xml-parser.c
@@ -626,10 +626,10 @@ primary_delta_parser_toplevel_start (PrimaryDeltaSAXContext *ctx,
{
SAXContext *sctx = &(&ctx->pctx)->sctx;
- if (!strcmp (name, "additions")) {
+ if (!strcmp (name, "delta:additions")) {
ctx->state = DELTA_PARSER_ADDITIONS;
}
- else if (!strcmp (name, "removals")) {
+ else if (!strcmp (name, "delta:removals")) {
ctx->state = DELTA_PARSER_REMOVALS;
}
@@ -705,7 +705,7 @@ primary_delta_parser_removals_end (PrimaryDeltaSAXContext *ctx,
sctx->want_text = FALSE;
}
- else if (!strcmp (name, "removals")) {
+ else if (!strcmp (name, "delta:removals")) {
ctx->state = DELTA_PARSER_TOPLEVEL;
}
}
@@ -719,7 +719,7 @@ primary_delta_sax_end_element (void *data, const char *name)
switch (ctx->state) {
case DELTA_PARSER_ADDITIONS:
if (ctx->pctx.state == PRIMARY_PARSER_TOPLEVEL) {
- if (!strcmp (name, "additions"))
+ if (!strcmp (name, "delta:additions"))
ctx->state = DELTA_PARSER_TOPLEVEL;
}
else
@@ -1040,10 +1040,10 @@ filelist_delta_parser_toplevel_start (FilelistDeltaSAXContext *ctx,
{
SAXContext *sctx = &(&ctx->pctx)->sctx;
- if (!strcmp (name, "additions")) {
+ if (!strcmp (name, "delta:additions")) {
ctx->state = DELTA_PARSER_ADDITIONS;
}
- else if (!strcmp (name, "removals")) {
+ else if (!strcmp (name, "delta:removals")) {
ctx->state = DELTA_PARSER_REMOVALS;
}
@@ -1108,7 +1108,7 @@ filelist_delta_parser_removals_end (FilelistDeltaSAXContext *ctx,
sctx->want_text = FALSE;
}
- else if (!strcmp (name, "removals")) {
+ else if (!strcmp (name, "delta:removals")) {
ctx->state = DELTA_PARSER_TOPLEVEL;
}
}
@@ -1122,7 +1122,7 @@ filelist_delta_sax_end_element (void *data, const char *name)
switch (ctx->state) {
case DELTA_PARSER_ADDITIONS:
if (ctx->pctx.state == FILELIST_PARSER_TOPLEVEL) {
- if (!strcmp (name, "additions"))
+ if (!strcmp (name, "delta:additions"))
ctx->state = DELTA_PARSER_TOPLEVEL;
}
else
@@ -1446,10 +1446,10 @@ other_delta_parser_toplevel_start (OtherDeltaSAXContext *ctx,
{
SAXContext *sctx = &(&ctx->pctx)->sctx;
- if (!strcmp (name, "additions")) {
+ if (!strcmp (name, "delta:additions")) {
ctx->state = DELTA_PARSER_ADDITIONS;
}
- else if (!strcmp (name, "removals")) {
+ else if (!strcmp (name, "delta:removals")) {
ctx->state = DELTA_PARSER_REMOVALS;
}
@@ -1514,7 +1514,7 @@ other_delta_parser_removals_end (OtherDeltaSAXContext *ctx,
sctx->want_text = FALSE;
}
- else if (!strcmp (name, "removals")) {
+ else if (!strcmp (name, "delta:removals")) {
ctx->state = DELTA_PARSER_TOPLEVEL;
}
}
@@ -1528,7 +1528,7 @@ other_delta_sax_end_element (void *data, const char *name)
switch (ctx->state) {
case DELTA_PARSER_ADDITIONS:
if (ctx->pctx.state == OTHER_PARSER_TOPLEVEL) {
- if (!strcmp (name, "additions"))
+ if (!strcmp (name, "delta:additions"))
ctx->state = DELTA_PARSER_TOPLEVEL;
}
else
--
1.5.2.2.1345.gbf4a0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20070626/17cfe636/attachment.pgp
More information about the Yum-devel
mailing list