Ir al contenido principal.
Enlaces relacionados:  Press Room  Company  Clients  Contact us
Solsoft

Forum

Preserving field order


Author Message
Written on: 09. 05. 2003 [17:56]
fgomez@criba.edu.ar
=?Windows-1252?Q?Fernando_J._G=F3mez?
registered since: 31.12.1969
Posts: 0
------=_NextPart_000_00C4_01C3165C.B4F40880
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hola!

[This message is about a topic relevant to the PHP extension, but not limited to it.]

I wonder if anybody here has been thinking about the importance of preserving the order of the fields in an ISIS record. Field order indeed matters, at least in some cases where MARC bibliographic records are involved. This implies that we must be careful when we choose a representation of those records in terms of, say, an array.=20

Playing with the demo that Braulio has offered to us, I've noticed that the programmer views the record as an associative array where

a. the entries (or elements) of the array do not have any particular order (or, if they have one,=20
it is by tag value);
b. all occurrences of a certain tag value, are grouped together.

Thus, for example, if a cataloguer has created a record with the following fields:

502 =AB ^aThesis (M.A.)--Yale University, 1974.=BB
500 =AB ^aIncludes index.=BB

the corresponding array looks like:

Array
(
[500] =3D> ^aThesis (M.A.)--Yale University, 1974.
[502] =3D> ^aIncludes index.
)

And how do we know now that the cataloguer wanted 502 to appear first?

On the other hand, we may have a situation like this:

600 =AB ^aGalilei, Galileo^xBiographies.=BB
650 =AB ^aPhysics^xHistory.=BB
600 =AB ^aKepler, Johannes.=BB

where the occurrences of field 600 are not supposed to be displayed together, but in the order arranged by the cataloguer. Again, this array representation:

Array
(
[600] =3D> Array
(
[0] =3D> ^aGalilei, Galileo^xBiographies.
[1] =3D> ^aKepler, Johannes.
)
[650] =3D> ^aPhysics^xHistory.
)

losses information about the original field order.

To solve these problems, an alternative representation is needed, and the most natural seems to be this one:

Array
(
[0] =3D> Array
(
[tag] =3D> 600
[value] =3D> ^aGalilei, Galileo^xBiographies.
)

[1] =3D> Array
(
[tag] =3D> 650
[value] =3D> ^aPhysics^xHistory.
)

[2] =3D> Array
(
[tag] =3D> 600
[value] =3D> ^aKepler, Johannes.
)
)

I agree that this structure may not be very handy when trying to access a specific field, but at least it has the property of not loosing information about field order. And certainly the other structure (the one currently used by the PHP extension) can be built from this one (but not the other way round).

Well, I guess this should go to the WishList...

Any comments?

Fernando


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Fernando J. Gómez

Biblioteca Dr. Antonio Monteiro
Instituto de Matem=E1tica de Bahía Blanca (CONICET/UNS)
Av. Alem 1253
8000 Bahía Blanca - Argentina
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D


------=_NextPart_000_00C4_01C3165C.B4F40880
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4807.2300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Hola!</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>[This message is&nbsp;about a topic relevant to the PHP=20
extension, but not limited to it.]</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I wonder if anybody here has been thinking about the
importance of preserving the order of the fields in an ISIS record.&nbsp;Field=20
order indeed matters, at least in some cases where MARC bibliographic records=20
are involved. This implies that we must be careful when we choose a=20
representation of those records in terms of, say, an array. </FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Playing with the demo that Braulio has offered to us, I've=20
noticed that the programmer views the record as an associative array=20
where</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp;a. the entries (or elements) of the array do not have=20
any particular order (or, if they have one, </FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; it&nbsp;is by tag value);</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;b. all occurrences of a certain tag value, are grouped=20
together.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Thus, for example, if a cataloguer has created a record with=20
the following&nbsp;fields:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&nbsp; 502 =AB&nbsp; ^a<FONT size=3D3>Thesis (M.A.)--Yale=20
University, 1974.</FONT>=BB</FONT></DIV>
<DIV><FONT size=3D2>&nbsp; 500 =AB&nbsp; ^a<FONT size=3D3>Includes=20
index.</FONT>=BB</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>the corresponding array looks like:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><FONT size=3D3>Array<BR>(</FONT></FONT></DIV>
<DIV>&nbsp;&nbsp;<FONT size=3D3>[500] =3D&gt;&nbsp;&nbsp; ^aThesis (M.A.)--Yale=20
University, 1974.</FONT></DIV>
<DIV>&nbsp; [502] =3D&gt;&nbsp;&nbsp; ^aIncludes index.</DIV>
<DIV>icon_wink.gif</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>And how do we know now that the cataloguer wanted 502 to=20
appear first?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>On the other hand, we may have a situation like=20
this:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>
<DIV><FONT size=3D2>&nbsp;&nbsp; 600 =AB&nbsp; ^aGalilei,=20
Galileo^xBiographies.=BB</FONT></DIV></FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp; 650 =AB&nbsp; ^aPhysics^xHistory.=BB</FONT></DIV>
<DIV><FONT size=3D2>
<DIV><FONT size=3D2>&nbsp;&nbsp; 600 =AB&nbsp; ^aKepler,=20
Johannes.=BB</FONT></DIV></FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>where the occurrences of field 600 are not supposed to be=20
displayed together, but in the order arranged by the cataloguer. Again, this=20
array representation:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>
<DIV><FONT size=3D2><FONT size=3D3>Array<BR>(</FONT></FONT></DIV>
<DIV>&nbsp;&nbsp;&nbsp; [600] =3D&gt;=20
Array<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
[0] =3D&gt;&nbsp;&nbsp; ^aGalilei,=20
Galileo^xBiographies.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
[1] =3D&gt;&nbsp;&nbsp; ^aKepler,=20
Johannes.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
)<BR><FONT size=3D3>&nbsp;&nbsp; [650] =3D&gt;&nbsp;</FONT><FONT size=3D2>&nbsp;=20
^aPhysics^xHistory.</FONT></DIV></FONT></DIV>
<DIV><FONT size=3D2>icon_wink.gif</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>losses information about the original field=20
order.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>To solve these problems, an alternative representation is=20
needed, and the most natural seems to be this one:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT size=3D2>
<DIV><FONT size=3D2><FONT size=3D3>Array<BR>(</FONT></FONT></DIV>
<DIV>&nbsp;&nbsp;&nbsp; [0] =3D&gt;=20
Array<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
[tag]&nbsp;&nbsp;=20
=3D&gt;&nbsp;600<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
[value] =3D&gt;&nbsp;&nbsp; ^aGalilei, Galileo^xBiographies.</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
)<BR><FONT size=3D3>
<DIV>&nbsp;&nbsp;&nbsp;[1] =3D&gt;=20
Array<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
[tag]&nbsp;&nbsp;=20
=3D&gt;&nbsp;650<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
[value] =3D&gt;&nbsp;<FONT size=3D2>&nbsp; ^aPhysics^xHistory.</FONT></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
)<BR></FONT></FONT><FONT size=3D2>
<DIV>&nbsp;&nbsp;&nbsp; [2] =3D&gt;=20
Array<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
[tag]&nbsp;&nbsp;=20
=3D&gt;&nbsp;600<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
[value] =3D&gt;&nbsp;&nbsp; ^aKepler, Johannes.</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
)<BR>icon_wink.gif</FONT></DIV></DIV></DIV></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV><FONT size=3D2>I agree that this structure=20
may not be very handy when trying to access a specific field, but at least it=20
has the property of not loosing information about field order. And certainly the=20
other structure (the one currently used by the PHP extension) can be built from=20
this one (but not the other way round).</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Well, I guess this should go to the WishList...</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Any comments?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Fernando</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR>Fernando J.=20
Gómez</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV>Biblioteca Dr. Antonio Monteiro<BR>Instituto de Matem=E1tica de Bahía Blanca=20
(CONICET/UNS)<BR>Av. Alem 1253<BR>8000 Bahía Blanca -=20
Argentina<BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<BR></DIV></BODY>

------=_NextPart_000_00C4_01C3165C.B4F40880--

------------------------------------------
Posted to Phorum via PhorumMail



User login

Enter your username and password here in order to log in on the website:
Login

Forgot your password?


Copyright © 2003-2009, Solsoft de Costa Rica S.A.
Declaración de privacidad