5 Replies Latest reply: Apr 23, 2012 6:19 AM by 537206 RSS

    XQuery not returning any results when doc contains ENTITY refs

    537206
      Dear Forum members,

      I am a bdbxml newbie so please be gentle.

      I am trying to run xqueries against a TEI P5 document on bdxml 2.4.13 using Oxygen 9 (I'm also using Python and the API - it's not working either)

      My XML contains transcripts of poems written in medieval Welsh. There are a lot of Entity references which I am including at the start of the document as:

      <?oxygen RNGSchema="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/teilite.rng" type="xml"?>
      <!DOCTYPE TEI [

      <!ENTITY aacute     "&#x00E1;"> <!-- LATIN SMALL LETTER A WITH ACUTE -->
      <!ENTITY Aacute     "&#x00C1;"> <!-- LATIN CAPITAL LETTER A WITH ACUTE -->
      <!ENTITY acirc     "&#x00E2;"> <!-- LATIN SMALL LETTER A WITH CIRCUMFLEX -->
      <!ENTITY Acirc     "&#x00C2;"> <!-- LATIN CAPITAL LETTER A WITH CIRCUMFLEX -->
      <!ENTITY agrave     "&#x00E0;"> <!-- LATIN SMALL LETTER A WITH GRAVE -->
      <!ENTITY Agrave     "&#x00C0;"> <!-- LATIN CAPITAL LETTER A WITH GRAVE -->
      <!ENTITY aring     "&#x00E5;"> <!-- LATIN SMALL LETTER A WITH RING ABOVE -->
      <!ENTITY Aring     "&#x00C5;"> <!-- LATIN CAPITAL LETTER A WITH RING ABOVE -->
      <!ENTITY atilde     "&#x00E3;"> <!-- LATIN SMALL LETTER A WITH TILDE -->
      <!ENTITY Atilde     "&#x00C3;"> <!-- LATIN CAPITAL LETTER A WITH TILDE -->
      <!ENTITY auml     "&#x00E4;"> <!-- LATIN SMALL LETTER A WITH DIAERESIS -->
      <!ENTITY Auml     "&#x00C4;"> <!-- LATIN CAPITAL LETTER A WITH DIAdERESIS -->
      <!ENTITY aelig     "&#x00E6;"> <!-- LATIN SMALL LETTER AE -->
      <!ENTITY AElig     "&#x00C6;"> <!-- LATIN CAPITAL LETTER AE -->
      <!ENTITY ccedil     "&#x00E7;"> <!-- LATIN SMALL LETTER C WITH CEDILLA -->
      <!ENTITY Ccedil     "&#x00C7;"> <!-- LATIN CAPITAL LETTER C WITH CEDILLA -->
      <!ENTITY eth     "&#x00F0;"> <!-- LATIN SMALL LETTER ETH -->
      <!ENTITY ETH     "&#x00D0;"> <!-- LATIN CAPITAL LETTER ETH -->
      <!ENTITY eacute     "&#x00E9;"> <!-- LATIN SMALL LETTER E WITH ACUTE -->
      <!ENTITY Eacute     "&#x00C9;"> <!-- LATIN CAPITAL LETTER E WITH ACUTE -->
      <!ENTITY ecirc     "&#x00EA;"> <!-- LATIN SMALL LETTER E WITH CIRCUMFLEX -->
      <!ENTITY Ecirc     "&#x00CA;"> <!-- LATIN CAPITAL LETTER E WITH CIRCUMFLEX -->
      <!ENTITY egrave     "&#x00E8;"> <!-- LATIN SMALL LETTER E WITH GRAVE -->
      <!ENTITY Egrave     "&#x00C8;"> <!-- LATIN CAPITAL LETTER E WITH GRAVE -->
      <!ENTITY euml     "&#x00EB;"> <!-- LATIN SMALL LETTER E WITH DIAERESIS -->
      <!ENTITY Euml     "&#x00CB;"> <!-- LATIN CAPITAL LETTER E WITH DIAERESIS -->
      <!ENTITY iacute     "&#x00ED;"> <!-- LATIN SMALL LETTER I WITH ACUTE -->
      <!ENTITY Iacute     "&#x00CD;"> <!-- LATIN CAPITAL LETTER I WITH ACUTE -->
      <!ENTITY icirc     "&#x00EE;"> <!-- LATIN SMALL LETTER I WITH CIRCUMFLEX -->
      <!ENTITY Icirc     "&#x00CE;"> <!-- LATIN CAPITAL LETTER I WITH CIRCUMFLEX -->
      <!ENTITY igrave     "&#x00EC;"> <!-- LATIN SMALL LETTER I WITH GRAVE -->
      <!ENTITY Igrave     "&#x00CC;"> <!-- LATIN CAPITAL LETTER I WITH GRAVE -->
      <!ENTITY iuml     "&#x00EF;"> <!-- LATIN SMALL LETTER I WITH DIAERESIS -->
      <!ENTITY Iuml     "&#x00CF;"> <!-- LATIN CAPITAL LETTER I WITH DIAERESIS -->
      <!ENTITY ntilde     "&#x00F1;"> <!-- LATIN SMALL LETTER N WITH TILDE -->
      <!ENTITY Ntilde     "&#x00D1;"> <!-- LATIN CAPITAL LETTER N WITH TILDE -->
      <!ENTITY oacute     "&#x00F3;"> <!-- LATIN SMALL LETTER O WITH ACUTE -->
      <!ENTITY Oacute     "&#x00D3;"> <!-- LATIN CAPITAL LETTER O WITH ACUTE -->
      <!ENTITY ocirc     "&#x00F4;"> <!-- LATIN SMALL LETTER O WITH CIRCUMFLEX -->
      <!ENTITY Ocirc     "&#x00D4;"> <!-- LATIN CAPITAL LETTER O WITH CIRCUMFLEX -->
      <!ENTITY ograve     "&#x00F2;"> <!-- LATIN SMALL LETTER O WITH GRAVE -->
      <!ENTITY Ograve     "&#x00D2;"> <!-- LATIN CAPITAL LETTER O WITH GRAVE -->
      <!ENTITY oslash     "&#x00F8;"> <!-- CIRCLED DIVISION SLASH -->
      <!ENTITY Oslash     "&#x00D8;"> <!-- LATIN CAPITAL LETTER O WITH STROKE -->
      <!ENTITY otilde     "&#x00F5;"> <!-- LATIN SMALL LETTER O WITH TILDE -->
      <!ENTITY Otilde     "&#x00D5;"> <!-- LATIN CAPITAL LETTER O WITH TILDE -->
      <!ENTITY ouml     "&#x00F6;"> <!-- LATIN SMALL LETTER O WITH DIAERESIS -->
      <!ENTITY Ouml     "&#x00D6;"> <!-- LATIN CAPITAL LETTER O WITH DIAERESIS -->
      <!ENTITY szlig     "&#x00DF;"> <!-- LATIN SMALL LETTER SHARP S -->
      <!ENTITY thorn     "&#x00FE;"> <!-- LATIN SMALL LETTER THORN -->
      <!ENTITY THORN     "&#x00DE;"> <!-- LATIN CAPITAL LETTER THORN -->
      <!ENTITY uacute     "&#x00FA;"> <!-- LATIN SMALL LETTER U WITH ACUTE -->
      <!ENTITY Uacute     "&#x00DA;"> <!-- LATIN CAPITAL LETTER U WITH ACUTE -->
      <!ENTITY ucirc     "&#x00FB;"> <!-- LATIN SMALL LETTER U WITH CIRCUMFLEX -->
      <!ENTITY Ucirc     "&#x00DB;"> <!-- LATIN CAPITAL LETTER U WITH CIRCUMFLEX -->
      <!ENTITY ugrave     "&#x00F9;"> <!-- LATIN SMALL LETTER U WITH GRAVE -->
      <!ENTITY Ugrave     "&#x00D9;"> <!-- LATIN CAPITAL LETTER U WITH GRAVE -->
      <!ENTITY uuml     "&#x00FC;"> <!-- LATIN SMALL LETTER U WITH DIAERESIS -->
      <!ENTITY Uuml     "&#x00DC;"> <!-- LATIN CAPITAL LETTER U WITH DIAERESIS -->
      <!ENTITY yacute     "&#x00FD;"> <!-- LATIN SMALL LETTER Y WITH ACUTE -->
      <!ENTITY Yacute     "&#x00DD;"> <!-- LATIN CAPITAL LETTER Y WITH ACUTE -->
      <!ENTITY yuml     "&#x00FF;"> <!-- LATIN SMALL LETTER Y WITH DIAERESIS -->

      <!ENTITY lab "<">
      <!ENTITY rab ">">
      <!ENTITY amp "&amp;">
      <!ENTITY dash "-">
      <!ENTITY delta "d">
      <!ENTITY macron "-">
      <!ENTITY mdash "-">
      <!ENTITY nbsp "">
      <!ENTITY pound "">
      <!ENTITY cdb "c">
      <!ENTITY ddb "d">
      <!ENTITY ldb "l">
      <!ENTITY rdb "r">
      <!ENTITY udb "u">
      <!ENTITY umac "u">
      <!ENTITY wacute "w">
      <!ENTITY wcirc "w">
      <!ENTITY Wcirc "W">
      <!ENTITY ycirc "y">
      <!ENTITY Ycirc "Y">
      <!ENTITY vbar "vbar">

      ]>

      <TEI xmlns="http://www.tei-c.org/ns/1.0">
      <teiHeader>
      <fileDesc>
      <titleStmt>
      <title>...


      When I try an run a simple xquery like //TEI I'm not get any results. However, if I hack the XML source to remove all entity references, remove the ENTITY declarations and reload the document into bdbxml then the xqueries work. Can anyone offer any insght into why this situation may have arisen and how I might get around it? It seems as if the presence of the ENTITY declarations is somehow effecting the internal index...

      all help appreciated,

      AL