Currently, hi and del don't seem to be showing up when wrapped around a note. Is there a way of fixing this? I've tried various options and had little success.
Equally, it wouldn't be hard to make sure the hi and del tags are always inside note in the xml.
I'd say try something like template match="hi/del[child::note]" or del/hi[child::note]" which means, respectively, del within a hi, or hi within a del, and then on the span put the class so it has the variant with concat @rend etc. Finally, give it a high priority.
Not yet – this one is still ongoing. I still can't get <hi> and <del> to work outside the <note> tag. Though, to be fair, this doesn't occur that often so I could probably catch any instances in the xml when I proof the conversions.
Just noticed that my use of xml tags has messed up the previous comment. I'd meant to write that I still can't get hi and del tags to work outside the note tag. Apologies for the confusing looking message!
I thought we sorted this out by email?... If not, send me an example, and I'll see what I can do. (Incidentally, you have to use the angle brackets from the WYSIWYG to make the XML appear properly -- see how I've edited your note above. Also you can edit a comment once you've put it up by hitting the little pencil icon.)
Please resync. I appear to have fixed this, at least for the example you gave me. Just required one changed in the CSS. You might check various notes, both fitting the case above and others, just to see that all works properly.
Thanks for this! Almost there! It works when there is no place value on add, or where the place value is inline or below. But it doesn't work when the place value on add is "marginleft". If you resync you there are a couple of examples in the TEI file so you can see what I mean. Not sure why that is. Another tweak in CSS?
Hi Adrian. That definitely enables <del> and <hi> to work round note, but it ends up making everything within <add place="marginleft"> float to the margin. i.e. your revisions mean that .add.marginleft behaves in the same way as .note.marginleft. I'd rather just keep marginal additions in the body of the text for legibility, while allowing notes to float.
This enables the del and hi to work around note, but now it stops notes floating to the margin as they're supposed to. In xslt, in the lines shown below, if you reinsert ' ', 'margin left' (as we had before) it allows the notes to float, but it then stops del and hi working around them.
<xsl:template match="note[ancestor::add[@place='marginleft']]" priority="10">
<span class="{concat(name(), ' ', @type, ' ', @rend, ' ', @place, ' ', 'marginleft')}">
<xsl:apply-templates/>
</span>
I think I see the issue here. You want note, if it's ancestor is add place="marginleft," to be in the margin, but at the same time for anything else that's within add place="marginleft" you don't want it to be in the margin. Is that right? So:
<add place="marginleft"><note>Some text</note></add> will be in the left margin, whereas <add place="marginleft">Some text</add> will NOT be in the left margin.
Correct? In other words, please put all the specific cases you want in one XML file and tell me how each is supposed to work.
Hi Adrian. Yes, you're absolutely right. That's precisely what I want. I've now put all the instances in the xml file in the metamark-anchor folder in github, with descriptions of how they should appear.
As you'll see, hi and del are now working around note, but notes with an ancestor of add place="marginleft" aren't floating to the margin as they should. With a previous coding change we were able to get them to float, but it also had the unintended affect of making regular marginal additions float too. As you say, I want normal marginal additions (i.e. those which don't include a note) to appear in the body of the text in square brackets. I've included such 'normal' cases in the xml file as well so we can be sure they're unaffected.
Thanks Adrian. Initially I thought this was fixed. I did a lot more testing and it was all working well. But when I opened up a regular file, it seems to be messing other stuff up. Regular additions from the margin left (which should appear in the body of the text in brackets) now end up appearing in two columns, with the succeeding text alongside the added portion of text.
In the github folder I've changed the name of the xml file we were working on to 'Tests_TEI'. You can see that what you've done works for my many test scenarios. But I've also uploaded a new 'liv_00099_TEI' file where you'll see the problem I'm talking about on the first page, where it affects surrounding text. (In the github folder, it will also look like I've uploaded new xsl and css files, but I've just integrated some changes that I'd made in other files before we started experimenting with hi/del).
I made a small change that I think has fixed the issue as evident in the 99_TEI file. Can you take a look? When we meet next time, I can also show you a few ways to troubleshoot such issues.
Thanks Adrian. Closer, but not quite there. The last problem has gone (i.e. no crazy colums) but notes now aren't floating properly. They are floating but they're also bringing the rest of the line with them. You can see this on the first page, where the section heading V has brought the page number with it. You can also see it on 0098, 0101, 0107, 0109, 0110, 0111 and 0116. Half the note on 0105 is floating and the other half isn't, and the same thing occurs on 0116. A strange bit of overlap occurs on 0094 that wasn't previously issue (perhaps because the note is within two adds).
I'm reopening this issue. I've been checking the new xsl and css files, with your changes integrated, and an old problem has reemerged. hi and del are not working when outside note. You'd managed to fix this before. I've compared the new xsl and css files with my old ones, but can't spot where the issue might lie. Can you remember how you did this?
I've uploaded a file called 'tests' into github, which we used before (it has all the variations). If you want my old xsl and css files to compare, so you can track down the problem, let me know.
Currently, hi and del don't seem to be showing up when wrapped around a note. Is there a way of fixing this? I've tried various options and had little success.
Equally, it wouldn't be hard to make sure the hi and del tags are always inside note in the xml.
I'd say try something like template match="hi/del[child::note]" or del/hi[child::note]" which means, respectively, del within a hi, or hi within a del, and then on the span put the class so it has the variant with concat @rend etc. Finally, give it a high priority.
Unfortunately this didn't work for me (even when my code for colour variants of deletions and underling were removed).
I think we can close this?....
Not yet – this one is still ongoing. I still can't get
<hi>
and<del>
to work outside the<note>
tag. Though, to be fair, this doesn't occur that often so I could probably catch any instances in the xml when I proof the conversions.Just noticed that my use of xml tags has messed up the previous comment. I'd meant to write that I still can't get hi and del tags to work outside the note tag. Apologies for the confusing looking message!
I thought we sorted this out by email?... If not, send me an example, and I'll see what I can do. (Incidentally, you have to use the angle brackets from the WYSIWYG to make the XML appear properly -- see how I've edited your note above. Also you can edit a comment once you've put it up by hitting the little pencil icon.)
I don't think so. I can't find any record of it. Here's an actual example – though the unclear tag isn't really relevant:
<add place="marginleft" rend="gray" hand="#U2"><hi rend="underline"><note><persName><unclear cert="medium">Wilkes</unclear></persName></note></hi></add>
As you can see, I have the hi tag outside the note, which means that the note isn't being underlined.
Please resync. I appear to have fixed this, at least for the example you gave me. Just required one changed in the CSS. You might check various notes, both fitting the case above and others, just to see that all works properly.
Thanks for this! Almost there! It works when there is no place value on add, or where the place value is inline or below. But it doesn't work when the place value on add is "marginleft". If you resync you there are a couple of examples in the TEI file so you can see what I mean. Not sure why that is. Another tweak in CSS?
Resync. Two changes this time, one in XSL, one in CSS. See if that haven't messed up something else.
Hi Adrian. That definitely enables
<del>
and<hi>
to work round note, but it ends up making everything within<add place="marginleft">
float to the margin. i.e. your revisions mean that .add.marginleft behaves in the same way as .note.marginleft. I'd rather just keep marginal additions in the body of the text for legibility, while allowing notes to float.Try it now.
This enables the
del
andhi
to work around note, but now it stops notes floating to the margin as they're supposed to. In xslt, in the lines shown below, if you reinsert' ', 'margin left'
(as we had before) it allows the notes to float, but it then stopsdel
andhi
working around them.<xsl:template match="note[ancestor::add[@place='marginleft']]" priority="10"> <span class="{concat(name(), ' ', @type, ' ', @rend, ' ', @place, ' ', 'marginleft')}"> <xsl:apply-templates/> </span>
I think I see the issue here. You want note, if it's ancestor is add place="marginleft," to be in the margin, but at the same time for anything else that's within add place="marginleft" you don't want it to be in the margin. Is that right? So:
<add place="marginleft"><note>Some text</note></add>
will be in the left margin, whereas<add place="marginleft">Some text</add>
will NOT be in the left margin.Correct? In other words, please put all the specific cases you want in one XML file and tell me how each is supposed to work.
Hi Adrian. Yes, you're absolutely right. That's precisely what I want. I've now put all the instances in the xml file in the metamark-anchor folder in github, with descriptions of how they should appear.
As you'll see, hi and del are now working around note, but notes with an ancestor of add place="marginleft" aren't floating to the margin as they should. With a previous coding change we were able to get them to float, but it also had the unintended affect of making regular marginal additions float too. As you say, I want normal marginal additions (i.e. those which don't include a note) to appear in the body of the text in square brackets. I've included such 'normal' cases in the xml file as well so we can be sure they're unaffected.
I appear to have fixed this via CSS. Take a look.
Thanks Adrian. Initially I thought this was fixed. I did a lot more testing and it was all working well. But when I opened up a regular file, it seems to be messing other stuff up. Regular additions from the margin left (which should appear in the body of the text in brackets) now end up appearing in two columns, with the succeeding text alongside the added portion of text.
In the github folder I've changed the name of the xml file we were working on to 'Tests_TEI'. You can see that what you've done works for my many test scenarios. But I've also uploaded a new 'liv_00099_TEI' file where you'll see the problem I'm talking about on the first page, where it affects surrounding text. (In the github folder, it will also look like I've uploaded new xsl and css files, but I've just integrated some changes that I'd made in other files before we started experimenting with hi/del).
I made a small change that I think has fixed the issue as evident in the 99_TEI file. Can you take a look? When we meet next time, I can also show you a few ways to troubleshoot such issues.
Thanks Adrian. Closer, but not quite there. The last problem has gone (i.e. no crazy colums) but notes now aren't floating properly. They are floating but they're also bringing the rest of the line with them. You can see this on the first page, where the section heading V has brought the page number with it. You can also see it on 0098, 0101, 0107, 0109, 0110, 0111 and 0116. Half the note on 0105 is floating and the other half isn't, and the same thing occurs on 0116. A strange bit of overlap occurs on 0094 that wasn't previously issue (perhaps because the note is within two adds).
Take a look now.
Adrian, my friend, I think you've done it! I'll do a bit more checking before closing this issue, but I think we're there. Thanks for solving it.
Of course. Happy to help and always delighted with a step forward for Livingstone Online!
Hi Adrian,
I'm reopening this issue. I've been checking the new xsl and css files, with your changes integrated, and an old problem has reemerged.
hi
anddel
are not working when outsidenote
. You'd managed to fix this before. I've compared the new xsl and css files with my old ones, but can't spot where the issue might lie. Can you remember how you did this?I've uploaded a file called 'tests' into github, which we used before (it has all the variations). If you want my old xsl and css files to compare, so you can track down the problem, let me know.
Resync. I think I refixed this.
Well that was quick! Problem solved. Thanks.