Re: [xml] Bug or expected behaviour with xmlNewChild



On Mon, Aug 05, 2013 at 09:08:39PM +0100, Neil Barnes wrote:
On 05/08/13 04:26, Daniel Veillard wrote:
On Wed, Jul 31, 2013 at 08:32:01PM +0100, Neil Barnes wrote:
This one is really confusing me... I'm the first to admit I'm not at
all sure what I'm doing, but:

I'm trying to create an xhtml file as part of an epub. (I've already
successfully exported an html and imported an xml file into the
program, and I'm getting no error messages.)

My google-fu is weak on this one; I can find nothing relevant in
either the archive or generally on the net.

What I want:

<head>

<title>Unknown</title>

<link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />

<link href="../Styles/page_styles.css" rel="stylesheet" type="text/css" />

</head>

  ouch ...

and I cannot find a way to make the link elements terminate.


Code:
doc = htmlNewDoc (NULL, NULL);
  No.
http://www.w3.org/TR/xhtml1/#strict

First XHTML is *XML* , so xmlNewDoc() must be called.

Thank you, Daniel.

I found your example - (a) I failed to use xmlNewDoc() and (b) I
used htmlSaveFile() instead of xmlSaveFormatFileEnc() - as well as
the other errors you point out!

Sorted now.

Thanks again.

[re-adding the mailing-list]

  okay :-)
Actually if you want to help, could you turn your final test program
generating xhtml into something running standalone, then we could add
it to http://xmlsoft.org/examples/index.html
to help future people looking at doing the same kind of code.

There are many parts of the library where we don't have examples,
if we were to extend the set of examples, that would be a great,

Daniel

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/


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