Closed ilovan closed 9 years ago
It's possible. We would need a way (in the schema?) to mark a specific tag as an image tag, so that I could replace it with the appropriate HTML tag.
I know there are options for the TEI schema and that we have the Figure tag in the CWRC entry schema. I don't think we're going to need images inside Orlando documents, so no need of mapping there. @brundin , could you please provide the appropriate mappings for http://cwrc.ca/schemas/documentation/CWRC_entry/index.html#FIGURE and the other elements in its model, as well as the TEI image elements?
Will do. -- MRB
On Tue, Aug 18, 2015 at 12:00 AM, Mihaela Ilovan notifications@github.com wrote:
I know there are options for the TEI schema and that we have the Figure tag in the CWRC entry schema. I don't think we're going to need images inside Orlando documents, so no need of mapping there. @brundin https://github.com/brundin , could you please provide the appropriate mappings for http://cwrc.ca/schemas/documentation/CWRC_entry/index.html#FIGURE and the other elements in its model, as well as the TEI image elements?
— Reply to this email directly or view it on GitHub https://github.com/cwrc/CWRC-Writer/issues/352#issuecomment-132082494.
Hi Andrew,
I have added the mappings for the TEI figure element and the CWRC entry FIGURE element to the respective annotation object documents -- the figure/FIGURE mappings appear at the bottom of both of these documents:
CWRC annotation object document: https://docs.google.com/document/d/11WBJMToqzuwrDPa1XZ9l80Wo1uNERALGHM1Lxwy16mw/edit
TEI annotation object document: https://docs.google.com/document/d/1swmwJdgqxyMmd6YIhq6nPuKA7Na5EadYG6xVk4ua3MY/edit
The sample code blocks that are provided in these documents look like this:
CWRC sample code block for the FIGURE element:
<FIGURE>
<HEADING>Heading of image here</HEADING>
<FIGDESC>Description of the image here.</FIGDESC>
<GRAPHIC URL="http://cwrc.ca/path/to/image/here.jpg"/>
</FIGURE>
TEI sample code block for the figure element:
<figure>
<head>Heading of image here</head>
<figDesc>Description of the image here.</figDesc>
<graphic url="http://cwrc.ca/path/to/image/here.jpg"></graphic>
</figure>
Cheers, Michael
On Tue, Aug 18, 2015 at 12:10 AM, Michael Brundin brundin@ualberta.ca wrote:
Will do. -- MRB
On Tue, Aug 18, 2015 at 12:00 AM, Mihaela Ilovan <notifications@github.com
wrote:
I know there are options for the TEI schema and that we have the Figure tag in the CWRC entry schema. I don't think we're going to need images inside Orlando documents, so no need of mapping there. @brundin https://github.com/brundin , could you please provide the appropriate mappings for http://cwrc.ca/schemas/documentation/CWRC_entry/index.html#FIGURE and the other elements in its model, as well as the TEI image elements?
— Reply to this email directly or view it on GitHub https://github.com/cwrc/CWRC-Writer/issues/352#issuecomment-132082494.
So is this a new entity type then? What about graphic tags that aren't inside figure tags?
No, it won't be a new entity type. It's a just a way to mark up a figure or graphic image. The cwrc_entry.rng FIGURE element is modeled exactly the same way as the TEI figure element -- see the TEI documentation for the figure element here (note the example down at the bottom of the page):
http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-figure.html
In the TEI, the child graphic element can appear in other places than in the figure element, such as the p element, so I have now made the CWRC entry GRAPHIC element available in the CHRONPROSE, DATAITEM, and P elements, in addition to the FIGURE element. I also created a HEAD element, so the old HEADING element in the FIGURE element is now the HEAD element (this parallels the naming in the TEI figure element).
So, the upshot is that we can use the GRAPHIC element, with its URL attribute, as a way to reference inline graphic information.
I believe this arose from a use case that emerged in the CEWW projects, where they would like to reference a photograph of an author. They can now use the GRAPHIC element with its URL attribute to reference the appropriate image.
On Fri, Aug 21, 2015 at 9:59 AM, Andrew notifications@github.com wrote:
So is this a new entity type then? What about graphic tags that aren't inside figure tags?
— Reply to this email directly or view it on GitHub https://github.com/cwrc/CWRC-Writer/issues/352#issuecomment-133473209.
Michael is right about this not being a new entity.
Going back to your initial question, Andrew: "We would need a way (in the schema?) to mark a specific tag as an image tag, so that I could replace it with the appropriate HTML tag"
The tag to mark as an image in both the CWRC entry schema and the CWRC TEI is GRAPHIC (graphic respectively), with the URL attribute.
Thanks for clarifying this, Mihaela (i.e., distilling it from my long-winded discourse above!).
Michael
On Fri, Aug 21, 2015 at 5:52 PM, Mihaela Ilovan notifications@github.com wrote:
Michael is right about this not being a new entity.
Going back to your initial question, Andrew: "We would need a way (in the schema?) to mark a specific tag as an image tag, so that I could replace it with the appropriate HTML tag"
The tag to mark as an image in both the CWRC entry schema and the CWRC TEI is GRAPHIC (graphic respectively), with the URL attribute.
— Reply to this email directly or view it on GitHub https://github.com/cwrc/CWRC-Writer/issues/352#issuecomment-133592243.
Should be working now. Please test and confirm.
Tried both png and jpeg in a TEI document (http://apps.testing.cwrc.ca/editor/dev/editor_dev.htm#ImageTest) and in a CWRC entry document (http://apps.testing.cwrc.ca/editor/dev/editor_dev.htm#ImageTestTEI) Do we need to modify the style sheet to render the images at all? If so, I'll also test in dev 05.
There's a race condition with the loading of files that I need to fix. If you add a graphic tag from within the editor it should display the image from the URL.
Should be fixed now. The wikipedia hosted image in ImageTestTEI doesn't load because it's not a direct link to the image. The other image works fine for me.
Tested in CWRC and TEI documents with .jpg and .png images. Also, at @SusanBrown 's request, @brundin is adding image support to the Orlando schemas as well.
Michael, could you please let Andrew know when the edits to the Orlando schemas are complete and what elemets/attributes you used for images in those schemas?
Andrew/Mihaela: the edits to the Orlando schemas are complete with respect to adding image support. The elements/attributes for the Orlando schemas are exactly the same as with the CWRC entry schema, i.e., the elements GRAPHIC and FIGURE.
The only difference among the 3 Orlando schemas is that the GRAPHIC and FIGURE elements are also available in the DATAITEM element in the orlando_biography.rng schema (the DATAITEM element is only available in the orlando_biography.rng schema -- it's not in the orlando_event.rng and orlando_writing.rng schemas).
MRB
On Mon, Aug 31, 2015 at 2:26 PM, Mihaela Ilovan notifications@github.com wrote:
Tested in CWRC and TEI documents with .jpg and .png images. Also, at @SusanBrown https://github.com/SusanBrown 's request, @brundin https://github.com/brundin is adding image support to the Orlando schemas as well.
Michael, could you please let Andrew know when the edits to the Orlando schemas are complete and what elemets/attributes you used for images in those schemas?
— Reply to this email directly or view it on GitHub https://github.com/cwrc/CWRC-Writer/issues/352#issuecomment-136489350.
Thanks, @brundin .
Andrew, can you please proceed to adding image support for the Orlando schemas in CWRC-Writer?
Done.
Is this possible?
If the image is saved in the repository and the image tag contains the image URI, could we have the image displayed in the text area at its location and styled according to instructions specified in the associated stylesheet?