Hi,

 

I’m not sure if the following is a bug or if I misunderstand the scope of options set with SET. Suppose I have

a) A DTD that defines a text entity

b) A catalog file that points to the DTD

c) An XML file with a DOCTYPE line that references the DTD, and XML content that references the text entity

 

If I do the following in a standalone BaseX session

   SET DTD true

   SET CATFILE [path to my catalog file...]

   xquery fetch:xml([path to my XML file...])

then the text entities are missing, presumably because the catalog or DTD is not being read.

 

Either of the following works as expected, with the text entities resolved:

   xquery fetch:xml([path to my XML file...],map {‘dtd’: true(), ‘catfile’: [path to my catalog file...]})

   xquery doc([path to my XML file...])

 

But why do I have to use the 2nd input in fetch:xml if I used SET in the same session? I thought the SET command would suffice, and the 2nd input argument in fetch:xml was available if I either wanted to override an option I had previously set with SET or did not use SET previously.

 

Thanks,

Amanda