Skip to content

[FINNA-3708] Refactor LIDO record handling to use VuFindXml.#199

Open
EreMaijala wants to merge 1 commit into
NatLibFi:devfrom
EreMaijala:dev-lido-xml
Open

[FINNA-3708] Refactor LIDO record handling to use VuFindXml.#199
EreMaijala wants to merge 1 commit into
NatLibFi:devfrom
EreMaijala:dev-lido-xml

Conversation

@EreMaijala

Copy link
Copy Markdown
Contributor

This improves namespace support for LIDO records.

This improves namespace support for LIDO records.
@EreMaijala EreMaijala requested a review from mshroom June 16, 2026 09:33

@mshroom mshroom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Muutama kohta tässä, mutta en ehtinyt katsoa vielä kokonaan

if (!empty($result)) {
return $result;
}
if ('' !== ($result = $this->xmlDoc->firstValue($place, 'partOfPlace') ?? '')) {

@mshroom mshroom Jun 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

partOfPlace ei sisällä tekstiä vaan pitää kutsua tätä getSubLocationia uudestaan niinkuin aiemmin. Tyyliin:

if ($partOfNode = $this->xmlDoc->first($place, 'partOfPlace') {
    $result = $this->getSubLocation($partOfNode, true);
    if ('' !== $result) {
        return $result;
    }
}

= $this->xmlDoc->firstValue($placeNode, 'place/namePlaceSet/appellationValue') ?? '';
if ('' !== $appellationValue) {
$mainPlace = $appellationValue;
$placeNode = $this->xmlDoc->first($placeNode, 'place');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

voisiko tässä $placeNode olla vaikka $subPlaceNode, ei toi nyt taida sotkea mitään mutta vaikeuttaa ymmärtämistä kun $placeNode on jo tuossa käytössä eri elementillä

Comment on lines +616 to +619
if (!($descriptiveNoteValue = $this->xmlDoc->first($set, 'descriptiveNoteValue'))) {
continue;
}
if ('' === ($value = $this->xmlDoc->value($descriptiveNoteValue))) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eikö tässä olis kätevämpää vain tarkistaa firstValue($set, 'descriptiveNoteValue')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants