-
Notifications
You must be signed in to change notification settings - Fork 123
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
use ODT 'Author' style to specify author #327
Conversation
I fear something went wrong with this PR as there are no changes to the code? Or am I missing something? |
yeap, sorry. A bit of a newcomer with github. Just pushed the change, here is the commit in question: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested locally without any errors! That's the good news ;)
The bad news is, it seems there is some dependent issue with multiple authors? I'm not familiar with the odt format, but my guess it we should be able to support this (or restrict to one)?
select="/office:document-content/office:body/office:text/text:p[@text:style-name='Author']" | ||
/> | ||
</xsl:when> | ||
<xsl:when test="$META/office:meta/meta:initial-creator"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To reproduce the old version you should probably only take the first text:p[@text:style-name='Title']
(see old line 116), hence this should be $META[1]/office:meta/meta:initial-creator
odt/odttotei.xsl
Outdated
<xsl:when | ||
test="/office:document-content/office:body/office:text/text:p[@text:style-name='Author']"> | ||
<xsl:value-of | ||
select="/office:document-content/office:body/office:text/text:p[@text:style-name='Author']" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with the odt format but I guess there might be several authors (see also next comment). So it's probably safest to pick only the first text:p[@text:style-name='Author']
. Or we need to iterate over the authors when outputting these …
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed the old version only picked the first 'Title'-styled paragraph.
I see no reason for that. If the Title is streched on two lines, both should be taken.
Same rationale for the Author, especially given that one document might have several Authors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but within the resulting TEI document there should be an <author>
element for every author name (not several names within one <author>
element).
Could you add (and push) the appropriate <xsl:for-each>
loop to your branch (so the pull request will be updated)?
…label>. Useful for separable chapter labels like : <head><label>Chapter I</label> Where my adventures begin</head>
also added support for 'Epigraph' and 'Trailer' styles.
Hello again, sorry for the delay, I had completely forgotten XSLT. As I had to dive again recently into this marvellous set of tags language, I could also fix your request to generate several elements inside the titleStmt, if there are several paragraphs in the .odt styled with 'Author'. There are also a few additions, mainly taking care of special styles: Subtitle, Epigraph, Trailer etc which generate HTML elements. |
… is already a symlink to convertei. another fix should be proposed for peope who like having a generally available /usr/bin/odttotei symlink to wherever the stylesheets/bin is located.
some improvement over rendering epigraph, trailer... also refactored so that the stylesheet play well with both fodt and odt office:document-content vs office:document
…y translatable to q
Council has reviewed this and we think the merge looks a bit messy because of subsequent commits, so Peter will look at implementing it. We agree with the request. |
@peterstadler to go ahead, but look carefully at each individual change; for example, |
The Stylesheets group will have a look at it in the next meeting in October |
@sydb, @npcole and I looked at this today, and we believe that the original pull request has been severely muddied by additional commits to the same PR. It's also not clear whether @petrul did address @peterstadler's concerns about multiple authors, or the additional concern raised about multi-line titles. We suggest that each of these specific issues be raised as individual tickets and implemented. |
odt/odttotei.xsl
Outdated
@@ -877,7 +877,7 @@ of this software, even if advised of the possibility of such damage. | |||
</xsl:template> | |||
|
|||
<xsl:template match="office:binary-data"> | |||
<binaryObject encoding="base64" mimeType="image/jpg"> | |||
<binaryObject id="{generate-id()}" encoding="base64" mimeType="image/jpg"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@petrul — TEI does not have an @id
attribute. You mean @xml:id
, yes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for me it s a mystery why this commit ended up on this merge request, I just modified my own fork of tei-stylesheets and commited. I guess there's more to git than you can learn in a few years.
It these changes do not make sense for you, feel free to disregard this merge request.
Indeed, it would be the regular xml id attribute.
…On Mon, Aug 22, 2022 at 7:15 PM Syd Bauman ***@***.***> wrote:
***@***.**** requested changes on this pull request.
------------------------------
In odt/odttotei.xsl
<#327 (comment)>:
> @@ -877,7 +877,7 @@ of this software, even if advised of the possibility of such damage.
</xsl:template>
<xsl:template match="office:binary-data">
- <binaryObject encoding="base64" mimeType="image/jpg">
+ <binaryObject id="{generate-id()}" encoding="base64" mimeType="image/jpg">
@petrul <https://github.com/petrul> — TEI does not have an @id attribute.
You mean @xml:id, yes?
—
Reply to this email directly, view it on GitHub
<#327 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADRMLTDCBWT6NLM34VLGGTV2ORQVANCNFSM4FF5RONA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
We couldn't merge this PR, but we plan to implement this later on, see #625 |
this change allows the specification of the Author of the document also by using the 'Author' ODT Style (alternatively to the hard-to-access dc:initial-creator meta tag).
The 'Title' ODT Style is already used to allow the specification of the title of the document (alternatively to dc:title). This change extends the same logic for the Author.
(in libre office meta fields are either hard to access or downright missing in the GUI).