#4 XML elements off by one?

closed
Ian Ibbotson
None
5
2002-09-09
2002-09-08
Anonymous
No

Using a slightly modified version of Sample1.java, I am
successfully querying the LOC Voyager database. The
XML doc that I get back, however from
st.getTaskResultSet().getFragment(1,spec) appears to
have the fields shifted by one. Here is an example:

------------------- Result record -------------------

<?xml version="1.0" encoding="UTF-8"?>
<iso2709 CodingScheme=" " ImplDefined1="m"
ImplDefined17="8" ImplDefined18="a" ImplDefined19=" "
ImplDefined2=" " RecordStatus="c"
TypeOfRecord="a"><field
tag="005">12703807</field><field
tag="008">20020528144157.0</field><field
tag="906">020314s2002 ch 001 0 eng
</field><field Indicator1=" " Indicator2=" "
tag="925"><subfield code="a">7</subfield><subfield
code="b">cbc</subfield><subfield
code="c">orignew</subfield><subfield
code="d">1</subfield><subfield
code="e">ocip</subfield><subfield
code="f">20</subfield><subfield
code="g">y-gencatlg</subfield></field><field
Indicator1="0" Indicator2=" " tag="955"><subfield
code="a">acquire</subfield><subfield code="b">2 shelf
copies</subfield><subfield code="x">policy
default</subfield></field><field Indicator1=" "
Indicator2=" " tag="010"><subfield code="a">pc16
2002-03-14 to ASCD</subfield><subfield code="c">jf05
2002-03-15 to subj.</subfield><subfield code="a">jf01
2002-03-18 to CF for na for Ant (Computer
file)</subfield><subfield code="a">vb27 2002-05-22 to
ASCD/Tech I;</subfield><subfield code="d">jf01
2002-05-22 to SL</subfield><subfield code="e">jf12
2002-05-22 to Dewey</subfield><subfield code="a">aa20
2002-05-28</subfield></field><field Indicator1=" "
Indicator2=" " tag="020"><subfield code="a">
2002025250</subfield></field><field Indicator1=" "
Indicator2=" " tag="040"><subfield
code="a">0596001843</subfield></field><field
Indicator1=" " Indicator2=" " tag="042"><subfield
code="a">DLC</subfield><subfield
code="c">DLC</subfield></field><field Indicator1=" "
Indicator2=" " tag="050"><subfield
code="a">pcc</subfield></field><field Indicator1="0"
Indicator2="0" tag="082"><subfield
code="a">QA76.73.J38</subfield><subfield code="b">T57
2002</subfield></field><field Indicator1="0"
Indicator2="0" tag="100"><subfield
code="a">005.13/3</subfield><subfield
code="2">21</subfield></field><field Indicator1="1"
Indicator2=" " tag="245"><subfield code="a">Tilly,
Jesse.</subfield></field><field Indicator1="1"
Indicator2="0" tag="260"><subfield code="a">Ant
:</subfield><subfield code="b">the definitive guide
/</subfield><subfield code="c">Jesse Tilly & Eric
M. Burke.</subfield></field><field Indicator1=" "
Indicator2=" " tag="263"><subfield code="a">Beijing
;</subfield><subfield code="a">Cambridge, Mass.
:</subfield><subfield
code="b">O'Reilly,</subfield><subfield
code="c">2002.</subfield></field><field Indicator1=" "
Indicator2=" " tag="300"><subfield
code="a">0206</subfield></field><field Indicator1=" "
Indicator2=" " tag="650"><subfield code="a">p.
cm.</subfield></field><field Indicator1=" "
Indicator2="0" tag="630"><subfield code="a">Java
(Computer program language)</subfield></field><field
Indicator1="0" Indicator2="0" tag="700"><subfield
code="a">Ant (Computer file)</subfield></field><field
Indicator1="1" Indicator2=" " tag="963"><subfield
code="a">Burke, Eric M.</subfield></field><field
Indicator1=" " Indicator2=" " tag="12"><subfield
code="a">Angela Ackley,
707-827-7051</subfield></field></iso2709>

If the tags are supposed to represent the marc21 codes,
you will notice that they are off by one -- the
contents of what should be under "100" are under
"245", what should be under "245" (tittle, etc.) is
under "260" and so on. Is this a bug?

Discussion

  • Phil Steitz
    Phil Steitz
    2002-09-08

    Logged In: YES
    user_id=186631

    Submitted by Phil Steitz (phil@steitz.com -- SF user psteitz)

     
  • Phil Steitz
    Phil Steitz
    2002-09-09

    Logged In: YES
    user_id=186631

    Submitted by Phil Steitz (phil@steitz.com -- SF user psteitz)

     
  • Ian Ibbotson
    Ian Ibbotson
    2002-09-09

    Logged In: YES
    user_id=88018

    Yes, it's a bug, but it's already fixed in the latest
    version. Until 1.2 is officially released, you can download
    the latest development jar from
    http://developer.k-int.com/maven/ki-jzkit/jars/

     
  • Ian Ibbotson
    Ian Ibbotson
    2002-09-09

    • assigned_to: nobody --> ianibbo
    • status: open --> closed