You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Floroiu John <fl...@fokus.gmd.de> on 2000/06/06 15:14:48 UTC

setting "references" within an XML file


Hello,


I am a newbie to XML, so please excuse if I am asking a stupid question,
but whatever I do I only get parsing errors, although I believe somehow
it should be possible...

Starting from .../xerces-c-src_1_1_0/samples/data/personal.xml, all
I want is to append to the XML file a "reference" to "five.worker", so
that I could have it repeated twice in the DOM tree (in other words to
expand an already defined entity).

I would like to have the input file _like_ this:

  ~~~~~~~~~~~~~~~~~~~~~~~~
  <person id="five.worker">
    <name><family>Worker</family> <given>Five</given></name>
    <email>five@foo.com</email>
    <link manager="Big.Boss"></link>
  </person>

  %five.worker;   <!-- but this does not work !!! -->

</personnel>

in order to produce an output of this kind:

  <person id="five.worker">
    <name><family>Worker</family> <given>Five</given></name>
    <email>five@foo.com</email>
    <link manager="Big.Boss"></link>
  </person>

  <person id="five.worker">
    <name><family>Worker</family> <given>Five</given></name>
    <email>five@foo.com</email>
    <link manager="Big.Boss"></link>
  </person>

</personnel>

of course, loaded into a DOM tree


Any help will be greatly appreciated.
John.