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

ODD to XHTML|EPUB|DOCX|ODT transformations fail with the same error in functions.xsl #246

Closed
rvdb opened this issue Mar 16, 2017 · 9 comments

Comments

@rvdb
Copy link
Contributor

rvdb commented Mar 16, 2017

When generating documentation for the pureODD version of tei_jtei.odd with the bleeding-edge Oxygen-TEI framework (version 3.1.95), following transformations all fail with the same error:

  • TEI ODD XHTML
  • TEI ODD EPUB
  • TEI ODD DOCX
  • TEI ODD ODT

The error reported is situated in ${frameworks}\tei\xml\tei\stylesheet\common\functions.xsl:

XPTY0004: A sequence of more than one item is not allowed as the first argument of translate() ("teix:", "eg:")

(Note how the PDF transformation also fails with a different error, which is reported in #205)

@martindholmes
Copy link
Contributor

Do we just have two different prefixes defined for the examples namespace?

@rvdb
Copy link
Contributor Author

rvdb commented Mar 16, 2017

Ah, indeed: there is an (unused) namespace declaration on the <TEI> element:

<TEI xmlns="http://www.tei-c.org/ns/1.0" 
     xmlns:eg="http://www.tei-c.org/ns/Examples">

Yet, all example snippets declare their own (unprefixed) namespace:

<egXML xmlns="http://www.tei-c.org/ns/Examples">

If I remove the xmlns:eg="http://www.tei-c.org/ns/Examples" declaration from the <TEI> element, the transformations succeed.

@martindholmes
Copy link
Contributor

It's not uncommon to end up with multiple prefixes for the same ns where multiple XSLTs and input docs are involved. We should still fix this, I think.

@rvdb
Copy link
Contributor Author

rvdb commented Mar 17, 2017

I think the stylesheets should be able to cope with duplicate namespace declarations, indeed. Should I keep them in tei_jtei.odd as a reminder, or just remove the unused one?

I've had a quick (and tired) look at the offending code in functions.xsl; maybe a couple of bold suggestions:

Either of these makes the error go away. I haven't been able to figure out where these functions are used exactly, what they do exactly, and I'm aware they might be used in a plethora of different contexts, so well aware that I might be talking rubbish, it could be a pointer...

@martindholmes
Copy link
Contributor

Let's leave the namespace in the jtei ODD for the moment, but remember to remove it before the next release of TEI just in case. In the meantime, it's a simple test for the bug.

I don't really know what those functions are doing either. But this might be a nice little problem for our Stylesheets Co-operative Learning Group to look into.

@martindholmes
Copy link
Contributor

martindholmes commented Apr 6, 2017

Quick fix done for the graphics problem which was also reported on #205, to be committed by Syd; I will raise a separate ticket for some oddities in image rendering that still remain, and assign it to myself. c0fdef7.

@martindholmes
Copy link
Contributor

Added a fix for the second bug in 05502d1.

@martindholmes
Copy link
Contributor

I think this can be closed, assuming Mr Jenkins doesn't complain (he's slow today because it's the day for the Guidelines link checking job).

@martindholmes
Copy link
Contributor

All seems good. Closing this.

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

No branches or pull requests

2 participants