Re: [xml] recursive entities
- From: "William M. Brack" <wbrack mmm com hk>
- To: "Scott Murman" <smurman nas nasa gov>
- Cc: xml gnome org
- Subject: Re: [xml] recursive entities
- Date: Mon, 5 Apr 2004 08:06:01 +0800 (HKT)
Hi Scott,
I frequently get "burned" making guesses about what's happening,
but let me give it try anyway. I'm assuming you have your own
program making calls to the library, and that you are not talking
about using one of the library utility programs such as xmllint.
Let's begin by noting that Liam Quin's post showed that xmllint
works just fine, so it must be something which that program does
and your code does not do. Next let's note that he used the
'--noent' flag. What does that do? Answer - it sets the
XML_PARSE_NOENT flag (I *love* open source projects, where you can
look at how other programs work). So, my first guess would have
to be that you are not setting that flag when calling whatever API
routine you are using to parse the file (refer to the docs for
details about what this flag does). Could that possibly be it?
Bill
Scott Murman said:
ok, let's take this further, because i'm definitely not getting the
right functionality. i'm using libxml2-2.6.2. if i use the entity
defs below, then define an element as
<Foo Name="example">
<Bar Init="&Height;" />
</Foo>
this will expand so that Init = "2.0 * &Alt;", not Init = "2.0 *
1.0".
any clues what i'm doing wrong?
-SM-
our group would like to use recursive entity definitions, i.e.
<!DOCTYPE Scenario SYSTEM "Scenario.dtd" [
<!ENTITY Alt "1.0">
<!ENTITY Height "2.0 * &Alt;">
]>
works fine for me with, e.g. xmllint --noent filename.xml
(version here is libxml2-2.6.6-1mdk)
Yeah, I doubt such a breakage would go unnoticed though the
regression tests.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]