Re: [xml] XML fragments

Date view Thread view Subject view Author view

From: Havoc Pennington (hp@Mcs.Net)
Date: Sun Feb 28 1999 - 16:05:29 EST


On Sun, 28 Feb 1999, Daniel Veillard wrote:
>
> Yes, and yes :-)
>

Thanks!
 
> BTW, could you indicate what kind of use you have in mind ? If this
> turn out to be useful to others I may move it directly in tree.h .
>

Well, it is sort of ugly. I am writing something for publication, and the
publisher wants it in some atrocious format that will work with their
Microsoft software (their setup is ridiculously inefficient and
wrongheaded). I don't want to write in that format, because I want to be
able to manipulate the document with automated tools. I couldn't find an
existing DTD that was really appropriate. So I made up a little standalone
tag-set which corresponds to the styles they use, and using libxml I load
in my document and spit it out again in a format they can deal with.

Since the document is large I wanted #include type functionality,
and I thought the easiest way to do that would be with a magic <include>
tag, since I'm using my own hacky program to generate output anyway.
Now that I think about it I guess SGML at least had an "official" way to
do this. Anyway the included file contains an XML fragment.

Yesterday I hacked around it by loading the file into memory, placing
<dummy> </dummy> around the memory and parsing that, ignoring the top
node. But it sucks. :-) (The program is basically a single-use hack
though, so I'm not that concerned about it.)

Thanks,
Havoc

----
Message from the list xml@rufus.w3.org
Archived at : http://rufus.w3.org/veillard/XML/messages
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rufus.w3.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:26 EDT