Re: [xml] XInclude question



Daniel Veillard wrote:

On Mon, Apr 03, 2006 at 06:03:28PM -0400, gmxml saplings us wrote:
Daniel Veillard wrote:

On Mon, Apr 03, 2006 at 04:58:53PM -0400, gmxml saplings us wrote:
To it's own xml file, and rewite my main file as:
<gameconfig>
<TerrainTypeDefs>
<include href="terraintypes.xml">
</TerrainTypeDefs>
<gameconfig>
Where is the namespace ? Sure that example as provided will never
work as an XInclude... http://www.w3.org/TR/xinclude/#syntax
there is also examples in many places on the web or in libxml2 test suites.
I've search for XInclude, libxml, xmlXIncludeProcess, and xmlXIncludeProcessFlags in various combinations. Nothing helpfull was found.

 I pointed you to the spec. The spec defines the behaviour. You are not
following the spec. So don't expect the spec specified behaviour.


I'm not.  That's why I'm asking a question to learn what I'm doing wrong.

And all the examples I've found include the concept of working using a URL, wheras I'm using the file system(can I simply call it file:://g:/cygwin/home/gmort/atlantis for example).

 Bzzzz You didn't understood what I said it's not about href="" it's
about <include, your include element is in no namespace it's not an
XInclude element.
 You are just exposing that you don't understand what an XML namespace is
and that explain why you have troubles with XInclude,


I thought it was obvious, as I'm working on a open source game, written in a language I've never used(C++) and modifying it to read configuration data from XML instead of hardcoded arrays(I chose XML over INI files mainly because XML gives me nice features, provided I code for it, so that new tags can be ignored by older programs, and the files can be displayed by web browsers with the appropriate style sheet.) Your absolutely right, I don't understand the spec. I aim for functionality as it's a spare time project for me, not a profession. If I can get 80% of my needs met without spending a lot of time delving into the spec and learning it all, I'm gonna do that and move on with my life. It only took me two weeks to modify the program to read in the data since the libxml library is so well documented and gives good examples.

However, in the case of XInclude, those examples are lacking and the spec is geared for people who have a more thorough understanding of XML. No worries, I'll simply abadon XInclude as useless to me untill I have a few weeks to learn XML from the ground up. And with 3 kids, I'm guessing my desire to learn XML inside and out, for a non-professional use, is about zero compared to my desire to spend time with them. I had pretty much given up on it, but then I figured I recalled that when I went to college mailling lists tended to be populated by friendly individuals who often have gone through the growing pains and are happy to share their hard fought knowledge, so I might as well explain my problem to people who use XML and the libxml on a daily basis and either the problem would be ignored as not worth the time or someone would be able to easily explain the problem to me.

Thanks for your help, I never claimed the problem was in the code, I said I did not understand what I was doing wrong and that my code wasn't working.



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