Re: [xml] xml Digest, Vol 64, Issue 2

2009-08-03 Thread Piotr Sipika
Jerzy Jalocha N wrote: I would like to use a RELAX NG schema that is embedded inside some outer XML file: ?xml version='1.0' encoding='UTF-8'? wrapper xmlns='http://namespace.net/something' !-- Here would go a lot of stuff that belongs to the wrapper. -- grammar

Re: [xml] DTD validation whitespace removal

2010-02-04 Thread Piotr Sipika
John, Try parsing the document using: xmlReadFile(URI, encoding, options) with options set to XML_PARSE_NOBLANKS (in addition to anything else you want to use) Here's what I mean: #include stdio.h #include stdlib.h #include libxml/parser.h #include libxml/tree.h int main(int argc, char

Re: [xml] xml Digest, Vol 71, Issue 9

2010-03-15 Thread Piotr Sipika
Robert Coup wrote: ... gml_error.xsd:15: element complexType: Schemas parser error : local list type: A type, derived by list or union, must have the simple ur-type definition as base type, not '{http://www.example.org/gml}doubleList'. WXS schema gml_error.xsd failed to compile This

Re: [xml] error restricting complexType list (parsing official, GML schema)

2010-03-23 Thread Piotr Sipika
I apologize if this is a double-post, my initial reply did not make it to the list. Looking for input regarding this [possible] bug: Robert Coup wrote: ... gml_error.xsd:15: element complexType: Schemas parser error : local list type: A type, derived by list or union, must have the

Re: [xml] XML Schema, unique and namespaces

2010-04-13 Thread Piotr Sipika
Hi there. A few points: * Not sure this list is really an appropriate place to ask questions about the W3C XML Schema Language. Very true, but libxml2 supports (albeit incompletely) validating XML documents with XSD, so any questions pertaining to that are valid. * Why are you using

Re: [xml] XML Schema, unique and namespaces

2010-04-13 Thread Piotr Sipika
Hey, Hi! I'am trying to write a xml schema which must validate that a given attribute is unique. ... xsd:selector xpath=ptt:*/ ... I belive my problem is, that I can not figure out the correct xpath to write in the selector. Yes. It seems that you want every child (at any level)

Re: [xml] Validating XML file against XSD Schema

2010-05-06 Thread Piotr Sipika
Would someone please let me know how I can validate an XML file against its XSD Schema file. If there are validation errors I would then like to extract the human readable error description. You can find an example implementation here: http://wiki.njh.eu/XML-Schema_validation_with_libxml2

Re: [xml] cross compiling libxml2 with mingw

2010-05-13 Thread Piotr Sipika
Aaron, Still not finding them. Here is the entire build log: http://gist.github.com/400240 That's weird... Here's my configure line. The difference might be explicitly pointing CC to i386-mingw32-gcc (even though PATH is set correctly): ./configure CC=/opt/mingw32/bin/i386-mingw32-gcc

Re: [xml] Problem reading inner text when parsing through xpatha

2010-06-15 Thread Piotr Sipika
Ram, a b !--asda-- c c1=a Innext text/c d c1=a Innext text/d /b b !--asda-- c c1=a Innext text/c d c1=a Innext text/d /b /a snip I am using something like this to parse xmlXPathObjectPtr result = GetXpathNodes(xpath); //Assuming this

Re: [xml] Problem Creating DTD for programatically generated document

2012-01-24 Thread Piotr Sipika
On 01/24/2012 01:09 PM, Michael Maul wrote: The below appears to conform to the meaning of the AIP doc vor xmlNewDtd dtd2 = xmlNewDtd(xml_doc3,HTML,http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd,-//W3C//DTD XHTML 1.0 Strict//EN); However when the document is dumped it yeilds ?xml

Re: [xml] Remove whitespaces from text nodes

2012-02-14 Thread Piotr Sipika
On 02/14/2012 03:13 PM, Michael Ludwig wrote: spam.spam.spam.s...@free.fr schrieb am 14.02.2012 um 10:59 (+0100): Is there a function which do this work? Don't know the C API, but in XSLT there's the function normalize-space() and it does just what you want, so you might want to take a look

Re: [xml] Working with base schema definitions

2012-06-05 Thread Piotr Sipika
Abhishek Padmanabh wrote: Any ideas how I can provide 2 schema files to libxml2 without explicit dependencies such that it is able to find types in respective namespaces from base schema document. Or if not then if there is any other way to achieve this? Btw, xerces-c++ was able to handle this

Re: [xml] xml find and replace

2012-07-12 Thread Piotr Sipika
On 07/12/2012 09:53 AM, stuart shepherd wrote: Searching the web I've seen some examples in XSLT on how to do something like this, but I have never used XSLT. Does anyone know if there is a way to do this in XML. XSLT is your best bet. Here's a sample stylesheet which will: - change the name

Re: [xml] How to insert CDATA node in a xml tree

2012-10-24 Thread Piotr Sipika
Which function from API is needed to include data CDATA in a xml tree ? Try xmlNewCDataBlock [1]. Do you have a small sample ? No, but if you look at the code sample page [2], you should be able to find examples of adding child nodes into a document (see tree2.c). [1]:

Re: [xml] Retrieve all namespaces

2016-07-07 Thread Piotr Sipika
07.07.2016 5:12 PM "Martin Siggel" napisaƂ(a): > ... > Is there any function in libxml, to retrieve a list of all namespace > and prefixes used in the xml file? Hey Martin, See if the nsTab property of the xmlParserCtxt [1] is what you're after. [1]: