Skip to content

Parallel view with two pb-view filtering by xml:lang from a single document #302

@marcellocostaunipa

Description

@marcellocostaunipa

Hi,

I'm building a bilingual critical edition (Arabic/Latin) with TEI Publisher 10 + jinks on eXist-db 6.4.1.

My TEI file (averroes-sample.xml) has this structure:

<body>
  <div type="book" n="1">
    <div type="section" n="1">
      <div type="textpart" xml:lang="ar" xml:id="ar-1-1">...</div>
      <div type="textpart" xml:lang="la" xml:id="la-1-1">...</div>
    </div>
  </div>
</body>

I want a parallel two-column view: Arabic on the left, Latin on the right, from the same document.

My parallel.html template:

<div class="parallel-view">
  <pb-view src="document1" xpath="//div[@type='textpart'][@xml:lang='ar']" view="div" odd="averroes-edition"></pb-view>
  <pb-view src="document1" xpath="//div[@type='textpart'][@xml:lang='la']" view="div" odd="averroes-edition"></pb-view>
</div>

Problem: both columns show the full document content (Arabic + Latin together), ignoring the xpath filter.
Questions:

What is the correct way to filter content by xml:lang using pb-view xpath?
Should I use view="single" or view="div"?
Is there a working example of a bilingual parallel view from a single TEI document?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions