Re: [xml] xml Digest, Vol 54, Issue 16, Subscription




Subscribe
----------------------------------------
From: xml-request gnome org
Subject: xml Digest, Vol 54, Issue 16
To: xml gnome org
Date: Fri, 17 Oct 2008 11:52:08 +0000

Send xml mailing list submissions to
      xml gnome org

To subscribe or unsubscribe via the World Wide Web, visit
      http://mail.gnome.org/mailman/listinfo/xml
or, via email, send a message with subject or body 'help' to
      xml-request gnome org

You can reach the person managing the list at
      xml-owner gnome org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of xml digest..."


Today's Topics:

   1. truncated bytes in xml (Prashant R)
   2. [patch] add a --disable-rebuild-docs configure option
      (Adrian Bunk)
   3. SetObjectValue (Apparao Mulpuri)
   4. SAX Parsing continues though namespace constaint is violated
      (Rabi Narayan Sahoo)


----------------------------------------------------------------------

Message: 1
Date: Thu, 16 Oct 2008 16:39:05 -0700
From: "Prashant R" 
Subject: [xml] truncated bytes in xml
To: xml gnome org
Message-ID:
      
Content-Type: text/plain; charset="utf-8"

Hi ,

I am  using libxml2 in an embedded environment .
I am trying to use the xmlwriter API's to write xml.

some of the blocks have a sizeable amount of data (>1000 bytes ) .
I am using code similar to this to write each node



xmlNodePtr pDom ;

..

...

..

..


xmlTextWriterStartElement(writer,(const xmlChar *)kElem1);

xmlTextWriterWriteString(writer , BAD_CAST GetData() ); // line 2

xmlTextWriterEndElement(writer);


// 2nd element


// 3rd element


xmlTextWriterEndDocument(writer);

xmlFreeTextWriter(writer);


//write out xml to file system

xmlOutputBufferPtr buffptr= xmlOutputBufferCreateIO
(WriteCallbackFunction,CloseCallbackFunction, (void *)&file, NULL);

if(buffptr == NULL)

return false ;

// Buffer Ptr ,doc , currentnode , level , format , encoding

xmlNodeDumpOutput(buffptr, pDom->doc, pDom , 0,  0, NULL);

if(xmlOutputBufferClose(buffptr))

return true;


the problem is that  data  is missing in the final xml file.

Part of the data for Node 1 is written but the rest of the nodes are absent

something like
TUlJRFBEQ0NBaVNnQXdJQkFnSUpBdnNYK3dnSEJBQUNNQTBHQ1NxR1NJYjNEUUVCQlFVQU1I
Y3hDekFKQmdOVgpCQVlUQWxWVE1STXdFUVlEVlFRS0V3cEJjSEJzWlNCSmJtTXVNU1l3SkFZ

I have tried replacing the xmlTextWriterWriteString   with other similars
API's such as xmlTextWriterWriteRaw and xmlTextWriteWriteBase64 but havent
had any success !


Is anyone aware of any issues with this or a recommendation for a better way
to do this .

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

------------------------------

Message: 2
Date: Fri, 17 Oct 2008 13:11:03 +0300
From: Adrian Bunk 
Subject: [xml] [patch] add a --disable-rebuild-docs configure option
To: xml gnome org
Message-ID: 
Content-Type: text/plain; charset=utf-8

The Matrix tool [1] used in the ARM Linux Internet Platform [2] checks 
during builds whether shipped files have changed since the last build. 
This catches situations where people forgot to push local changes to the 
repository. It is very uncommon that software modifies shipped files 
during the build. Unfortunately, documentation files shipped in the 
libxml2 SVN get rebuild during a normal build.

[1] http://sandbox.movial.com/wiki/index.php/Matrix
[2] http://linux.onarm.com


With --disable-rebuild-docs shipped files will no longer change during 
the build.

By default, the files will still get rebuilt.

--- a/configure.in
+++ b/configure.in
@@ -166,6 +166,10 @@ AC_ARG_WITH(zlib,
 AC_ARG_WITH(coverage,
 [  --with-coverage         build for code coverage with GCC (off)])
 
+AC_ARG_ENABLE(rebuild-docs,
+[  --enable-rebuild-docs[[=yes/no]]  rebuild some generated docs [[default=yes]]])
+AM_CONDITIONAL([REBUILD_DOCS], [test "$enable_rebuild_docs" = "no"])
+
 dnl
 dnl hard dependancies on options
 dnl
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -26,7 +26,11 @@ EXTRA_DIST=xmlcatalog_man.xml tutorial/*.html tutorial/*.c tutorial/*.pdf \
 
 man_MANS = xmllint.1 xmlcatalog.1
 
+if REBUILD_DOCS
 all: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS)
+else
+all:
+endif
 
 api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src 
../elfgcchack.h
 


------------------------------

Message: 3
Date: Fri, 17 Oct 2008 16:06:34 +0530
From: "Apparao Mulpuri" 
Subject: [xml] SetObjectValue
To: xml gnome org
Message-ID:
      
Content-Type: text/plain; charset=ISO-8859-1

Hi,

   I am writing libxml equivalent for NSXML classes. I am struck at
following method implementation:

- (void)setObjectValue:(id)value

Here is the description of the above method:

This method can only be invoked on NSXMLNode objects that may have
content, specifically elements, attributes, namespaces, processing
instructions, text, and DTD-declaration nodes. The given object is
usually a Foundation equivalent to one of the atomic types in the
XQuery data model: NSNumber (integer, decimal, float, double,
Boolean), NSString (string), NSCalendarDate (date), NSData
(base64Binary and hexBinary), NSURL (URI), and NSArray (NMTOKENS,
IDREFS, ENTITIES). However, you can also set the object value to be a
custom value and register a value transformer (that is, an instance of
NSValueTransformer) to convert the object value to an XML string
representation when the node is asked for its string value. Setting a
node's object value removes all existing children, including
processing instructions and comments. Setting an element node's object
value creates a text node as the sole child. When an NSXMLNode object
emits its object-value contents as a string, and it can determine the
type of the value, it ensures that it the string is in a canonical
form as defined by the W3C XML Schema Data Types specification.


Could you please provide some pointers on " How to implement same
Equivalent by using LibXML"?


Thanks,
- Apparao.


------------------------------

Message: 4
Date: Fri, 17 Oct 2008 17:21:37 +0530
From: Rabi Narayan Sahoo 
Subject: [xml] SAX Parsing continues though namespace constaint is
      violated
To: xml gnome org
Cc: ashutosh_p huawei com, ranjit huawei com
Message-ID: 
Content-Type: text/plain; charset="us-ascii"

Hi

 

While parsing the following xml file with SAX Parsing I receive all the SAX
Event though it does not satisfy the namespace specification





In the above file ns1 is not declared which violates the Namespace
constraint: 

"The namespace prefix, unless it is xml or xmlns, MUST have been declared in
a namespace declaration attribute in either the start-tag of 

the element where the prefix is used or in an ancestor element"

Libxml simply gives the warning and continues to give SAX events. 

My question is why violation of this constraint is considered as a warning
not as a fatal error?

Thanks and Regards

       Rabi

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

------------------------------

_______________________________________________
xml mailing list
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml


End of xml Digest, Vol 54, Issue 16
***********************************

_________________________________________________________________
Hol dir 30 kostenlose Emoticons für deinen Windows Live Messenger
http://www.livemessenger-emoticons.com/funfamily/de-at/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]