diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-08-11 23:47:10 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-08-11 23:47:10 +0200 |
commit | e1318e904cf9440aa980e5d2cf65fa817c418761 (patch) | |
tree | c6f0a6de7f821f8ca52163e9ef8f7180454a83ce /genx.h | |
parent | 23f4b276959c1479f0a31115720de7c80ad3685c (diff) |
Add support for getting current element, attribute
Diffstat (limited to 'genx.h')
-rw-r--r-- | genx.h | 30 |
1 files changed, 23 insertions, 7 deletions
@@ -180,7 +180,7 @@ genxNamespace genxDeclareNamespace(genxWriter w, * If something failed, returns NULL and sets the status code via statusP */ genxElement genxDeclareElement(genxWriter w, - genxNamespace ns, constUtf8 type, + genxNamespace ns, constUtf8 name, genxStatus * statusP); /* @@ -210,7 +210,7 @@ typedef struct genxStatus genxStartDocSender(genxWriter w, genxSender * sender); /* - * End a document. Calls "flush" + * End a document. Calls "flush". */ genxStatus genxEndDocument(genxWriter w); @@ -249,7 +249,7 @@ genxStatus genxPI(genxWriter w, constUtf8 target, constUtf8 text); * Start an element */ genxStatus genxStartElementLiteral(genxWriter w, - constUtf8 xmlns, constUtf8 type); + constUtf8 xmlns, constUtf8 name); /* * Start a predeclared element @@ -258,26 +258,42 @@ genxStatus genxStartElementLiteral(genxWriter w, genxStatus genxStartElement(genxElement e); /* + * Get current element. The returned values are valid until this + * element ceases to be current (i.e., EndElement() is called). + * If the element is unqualified, then xmlns is set to NULL. + */ +genxStatus genxGetCurrentElement (genxWriter w, + constUtf8* xmlns, constUtf8* name); + +/* * Write an attribute */ genxStatus genxAddAttributeLiteral(genxWriter w, constUtf8 xmlns, constUtf8 name, constUtf8 value); /* + * Write a predeclared attribute + */ +genxStatus genxAddAttribute(genxAttribute a, constUtf8 value); + +/* * Start an attribute */ genxStatus genxStartAttributeLiteral(genxWriter w, constUtf8 xmlns, constUtf8 name); /* - * Write a predeclared attribute + * Start a predeclared attribute */ -genxStatus genxAddAttribute(genxAttribute a, constUtf8 value); +genxStatus genxStartAttribute(genxAttribute a); /* - * Start a predeclared attribute + * Get current attribute. The returned values are valid until this + * attribute ceases to be current (i.e., EndAttribute() is called). + * If the attribute is unqualified, then xmlns is set to NULL. */ -genxStatus genxStartAttribute(genxAttribute a); +genxStatus genxGetCurrentAttribute (genxWriter w, + constUtf8* xmlns, constUtf8* name); /* * End an attribute |