Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link element order and priority tests #172

Merged
merged 3 commits into from
Jul 1, 2022
Merged

Conversation

iherman
Copy link
Member

@iherman iherman commented Jun 23, 2022

The PR adds two tests to the link element in §5.3 of the reading system spec, for the following statement:

When resolving discrepancies and conflicts between metadata expressed in the package document and in linked metadata records, reading systems MUST use the document order of link elements [epub-33] in the package document to establish precedence

Fix #171

@m22chan, I reused an older test of yours (I have added a small sentence into the description, b.t.w.) with minimal changes, so I kept your name. I look at the onix file would be helpful to be sure that the title I added is o.k.

@m22chan
Copy link
Contributor

m22chan commented Jun 27, 2022

@iherman Ahh, okay, I see.
Since the two ONIX files in your additional test are in ONIX 3.0 format, I think we might have to move that title data down under the <TitleDetail>. We might also need to update the name of the element to match how Editeur renamed those fields when they went to version 3.0 of ONIX.

So for sampleONIX-30-first.xml, like:

<?xml version="1.0"?>
<ONIXMessage xmlns="http://ns.editeur.org/onix/3.0/reference" release="3.0">

  <Header>
    <Sender>
      <SenderName>My Publishing Company or Client Services Provider</SenderName>
    </Sender>
    <SentDateTime>20150723T142048Z</SentDateTime>
  </Header>

  <Product>
    <RecordReference>9789999999991</RecordReference>
    <NotificationType>04</NotificationType>

    <ProductIdentifier>
      <ProductIDType>15</ProductIDType>
      <IDValue>9789999999991</IDValue>
    </ProductIdentifier>

    <DescriptiveDetail>
      <ProductComposition>00</ProductComposition>
      <ProductForm>ED</ProductForm>

      <TitleDetail>
        <TitleType>01</TitleType>
        <TitleElement>
          <TitleElementLevel>01</TitleElementLevel>
          <TitleText>ONIX metadata title (first)!</TitleText>
        </TitleElement>
      </TitleDetail>
      <Language>
        <LanguageRole>01</LanguageRole>
        <LanguageCode>eng</LanguageCode>
      </Language>
      <Extent>
        <ExtentType>10</ExtentType>
        <ExtentValue>1234</ExtentValue>
        <ExtentUnit>03</ExtentUnit>
      </Extent>
    </DescriptiveDetail>

The rest of the file would be unchanged so I won't paste it here.

Similarly, for sampleONIX-30-second.xml:

<?xml version="1.0"?>
<ONIXMessage xmlns="http://ns.editeur.org/onix/3.0/reference" release="3.0">

  <Header>
    <Sender>
      <SenderName>My Publishing Company or Client Services Provider</SenderName>
    </Sender>
    <SentDateTime>20150723T142048Z</SentDateTime>
  </Header>

  <Product>
    <RecordReference>9789999999991</RecordReference>
    <NotificationType>04</NotificationType>

    <ProductIdentifier>
      <ProductIDType>15</ProductIDType>
      <IDValue>9789999999991</IDValue>
    </ProductIdentifier>

    <DescriptiveDetail>
      <ProductComposition>00</ProductComposition>
      <ProductForm>ED</ProductForm>

      <TitleDetail>
        <TitleType>01</TitleType>
        <TitleElement>
          <TitleElementLevel>01</TitleElementLevel>
          <TitleText>ONIX metadata title (second)!</TitleText>
        </TitleElement>
      </TitleDetail>
      <Language>
        <LanguageRole>01</LanguageRole>
        <LanguageCode>eng</LanguageCode>
      </Language>
      <Extent>
        <ExtentType>10</ExtentType>
        <ExtentValue>1234</ExtentValue>
        <ExtentUnit>03</ExtentUnit>
      </Extent>
    </DescriptiveDetail>

@iherman
Copy link
Member Author

iherman commented Jun 28, 2022

Thanks a lot, @m22chan ! I have updated all ONIX files accordingly.

If otherwise you think the tests are o.k., can you approve the PR?

Thanks again

Copy link
Contributor

@m22chan m22chan left a comment

Choose a reason for hiding this comment

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

Looks good!

@iherman iherman merged commit 5caa145 into main Jul 1, 2022
@iherman iherman deleted the link-element-statements branch July 30, 2022 15:47
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.

RS Section §5.3, statements on link element
2 participants