PHP-Fusion
v.7.01
AP-Fusion
v7.02.03
Pimped-Fusion-AP
v0.09.03
февраля 10 2012 17:17:18
Навигация
· Новости
· Статьи
· Скачать
· Форум
· Ссылки
· Категории новостей
· Обратная связь
· Галерея
· Поиск
· Гостевая
· Коллекция аватар
· CMS AP-Fusion. Отличия от PHP-Fusion
· Javascript справочник
· Разное
Сейчас на сайте
· Гостей: 3

· Пользователей: 0

· Всего пользователей: 441
· Новый пользователь: yak21
Информеры
Загрузка файлов  +  -
Бытовая техника:  +  
Лента alipapa.ru
Карпаты. Драгобрат.
Карпаты. Яремче, Яблунецкий перевал.
dbForge Studio for MySQL вместо PHPMyAdmin
Облачные технологии - насколько это серьезно?
Как распределяется вес по сайту
Совместимость CMS

Solomono.ru - сервис для веб-мастера
Микроразметка веб-страниц.
АГС - не приговор.
Немного о политике.

Что такое АГС и как с ним бороться?
Долгожданный АП PR
PR Google: 9 месяцев без апдейта

Поведенческий фактор - модная тенденция?
Wi-Fi дома. Что делать, если 192.168.0.1 занято?
Ускоренная переиндексация страниц в Яндексе

Как я ставил винду на нетбук.
ROOKEE - инструмент оптимизатора.
Строим рейтинг-каталог
Смайлики прошлого века
Ссылки  +  -
Блоги
Alipapa
» Блог Алипапы
lom
» Блог Лома
Последние активные темы форума
  Темы Просмотров Ответов Последние сообщения
Pimped-Fusion. Первые впеча...
Ошибки, баги, глюки
1705 81 Alipapa
10-02-2012 16:10
Произвольные Title на любой...
Вопросы по работе
44 1 Alipapa
07-02-2012 14:28
Мультикатегории в новостях
Моды, плагины
237 8 Alipapa
28-01-2012 00:47
AP-Fusion 7.02
Вопросы по работе
2710 29 Alipapa
18-01-2012 17:59
Расширенный каталог статей.
Моды, плагины
12065 167 Alipapa
14-12-2011 23:32

yaz_record

(PHP 4 >= 4.0.1, PHP 5)

yaz_record -- Returns a record

Description

string yaz_record ( resource id, int pos, string type )

Returns the record at position pos or an empty string if no record exists at the given position.

The yaz_record() function inspects a record in the current result set at the position specified by parameter pos. If no database record exists at the given position an empty string is returned.

Record positions in a result set are numbered 1, 2, ... $hits where $hits is the count returned by yaz_hits().

The type specifies the form of the returned record.

string

The record is returned as a string for simple display. In this mode, all MARC records are converted to a line-by-line format since ISO2709 is hardly readable. XML records and SUTRS are returned in their original format. GRS-1 are returned in a (ugly) line-by-line format.

This format is suitable if records are to be displayed in a quick way - for debugging - or because it is not feasible to perform proper display.

xml

The record is returned as an XML string if possible. In this mode, all MARC records are converted to MARCXML. XML records and SUTRS are returned in their original format. GRS-1 is not supported.

This format is similar to string except that MARC records are converted to MARCXML

This format is suitable if records are processed by an XML parser or XSLT processor afterwards.

raw

The record is returned as a string in its original form. This type is suitable for MARC, XML and SUTRS. It does not work for GRS-1.

MARC records are returned as a ISO2709 string. XML and SUTRS are returned as strings.

syntax

The syntax of the record is returned as a string, i.e. USmarc, GRS-1, XML, etc.

database

The name of database associated with record at the position is returned as a string.

array

The record is returned as an array that reflects the GRS-1 structure. This type is suitable for MARC and GRS-1. XML, SUTRS are not supported and if the actual record is XML or SUTRS an empty string will be returned.

The array returned consists of a list corresponding to each leaf/internal node of GRS-1. Each list item consists a sub list with first element path and data (if data is available).

The path which is a string holds a list of each tree component (of the structured GRS-1 record) from root to leaf. Each component is a tag type, tag value pair of the form (type, value

String tags normally has a corresponding tag type 3. MARC can also be returned as an array (they are converted to GRS-1 internally).

Замечание: It is the application which is responsible for actually ensuring that the records are returned from the Z39.50/SRW server in the proper format. The type given only specifies a conversion to take place on the client side (in PHP/YAZ).

Besides conversion of the transfer record to a string/array, PHP/YAZ it is also possible to perform a character set conversion of the record. Especially for USMARC/MARC21 that is recommended since these are typically returned in the character set MARC-8 that is not supported by browsers, etc. To specify a conversion, add ; charset=from, to where from is the original character set of the record and to is the resulting character set (as seen by PHP).

Пример 1. Array for GRS-1 record

Consider GRS-1 record

(4,52)Robert M. Pirsig
(4,70)
 (4,90)
       (2,7)Transworld Publishers, ltd.
This record has two nodes at root level. First element at root level is (4,52) [tag type 4, tag value 52], and has data Robert M. Pirsig. Second element at root level (4,70) has a subtree with a single element (4,90). (4,90) has yet another sub tree (2,7) with data Transworld Publishers, ltd..

If this record is present at position $p, then

$ar = yaz_record($id, $p, "array");
print_r($ar);
produces
Array
(
    [0] => Array
   (
       [0] => (4,52)
       [1] => Robert M. Pirsig
   )
    [1] => Array
   (
       [0] => (4,70)
   )
    [2] => Array
   (
       [0] => (4,70)(4,90)
   )
    [3] => Array
   (
       [0] => (4,70)(4,90)(2,7)
       [1] => Transworld Publishers, ltd.
   )
)

Пример 2. Working with MARCXML

The following PHP snippet returns a MARC21/USMARC record as MARCXML. The original record is returned in marc-8 (unknown to most XML parsers), so we convert it to UTF-8 (which all XML parsers must support).

$rec = yaz_record($id, $p, "xml; charset=marc-8,utf-8");

The record $rec can be processed with the Sablotron XSLT processor as follows:

$xslfile = 'display.xsl';
$processor = xslt_create();
$parms = array('/_xml' => $rec);
$res = xslt_process($processor, 'arg:/_xml', $xslfile, NULL, $parms);
xslt_free($processor);
$res = preg_replace("'</?html[^>]*>'", '', $res);
print $res;

For PHP 5 the XSL extension can be used instead of Sablotron XSLT.

Все функции PHP:
Авторизация
Логин

Пароль



Вы не зарегистрированы?
Нажмите здесь для регистрации.

Забыли пароль?
Запросите новый здесь.
Мини-чат
Вы должны авторизироваться, чтобы добавить сообщение.

04/02/2012 09:08
Еще раз прошу всех. Если вопрос не личный, пишите в форум. В личке, аське, скайпе, мейле и т.д. не консультирую

14/01/2012 18:45
avisei, пиши в форум, а не шли мне личные посланья

31/12/2011 16:01
С праздником Нового Года! Успехов, счастья, богатства!

08/12/2011 16:13
MySQL нужен. Инструкция вот: [url]http://ap-fus
ion.ru/downloads.p
hp?download_id=58[
/url]

08/12/2011 16:03
Я канеш дико извиняюсь, но где на этом сайте статья по установке fusion, нужен ему MySql или нет? Smile

07/12/2011 11:03
ОК)

07/12/2011 11:02
этот - для 7.0

07/12/2011 11:00
Я устанавливаю, как в инструкции. Куча ошибок. Не могу сделать upgrade!

07/12/2011 10:56
Для какой стандартной подходит, для такой же и ap-fusion подойдет

07/12/2011 10:54
Для какой версии AP-FUSION подходит "extended-downloads
"? Shock

24/10/2011 20:48
Валиор, я не поленился и проверил еще раз - в трех файлах этот фрагмент есть, в одном из них - дважды. Так что я не ошибся, это Вы так искали.

24/10/2011 16:06
Ну Вам удалось, значит в принципе возможно. А вообще не рекомендую, но если очень хочется, придется смириться с некоторыми неудобствами. На этом сайте поддержка реализована частично.

24/10/2011 16:05
Возможно ли регистрировать кирилические ники? В письме с регистрацией не указан логин.
Подписаться на лучшие цены - сайдинг цена. Комплектуем строительные объекты.
21/10/2011 17:03
Занимаюсь. Локаль в порядок привожу. Сегодня или завтра что-нибудь выложу.

20/10/2011 16:09
да бог с ним, ты лучше пимпедом займись, а я не буду в этой сборке использовать основной каталог.

18/10/2011 21:54
Papich, плагин проверю обязательно, мб неисправленный в сборку поставил

22/09/2011 20:47
http://tools.dynam
icdrive.com/favico
n/ - фавиконка быстро и удобно

12/08/2011 21:09
Потому что не осознали еще всего того удобства, что он предоставляет.

10/08/2011 10:20
Почему никого не интересует мой новый чат?

13/06/2011 12:13
Самому не нравится. Пробовал по всякому. Вдобавок ещё и таблицу обрезает, остаётся процентов 40. http://www.cqham.s
umy.ua/viewpage.ph
p?page_id=44 - вариант вставки таблицы

Анонс
Последние статьи
· СМС и Вебмани
· TinyMCE для пользова...
· PCRE (Perl Compatibl...
· PCRE (Perl Compatibl...
· 510
4,242,278 уникальных посетителей Iceberg by Harly