Ticket #496 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

XHTML for exercise elements

Reported by: cmueller Owned by: nmueller
Priority: minor Milestone:
Component: XSLT Version:
Keywords: Cc: clange, dmisev
Blocked By: Blocking:
Due to close: Include in GanttChart: no
Dependencies: Due to assign:

Description

I used the default XSLT in JOMDoc to render an exercise element (jomdoc transform -X exam08.omdoc > exam08.xhtml)

The below extract of the input document exam08

<tgroup layout="section">
 <metadata>
   <dc:title>Graphs</dc:title>
 </metadata>
 <exercise xml:id="..." ic="points=5,minutes=15">
   <metadata>
     <dc:title>The graph 1 problem</dc:title>
   </metadata>
   <CMP>This problem on graphs is very easy.</CMP>
 </exercise>
</tgroup>

was transformed to

<div class="omdoc-tgroup">
 <h2>1. Graphs</h2>
  <div class="omdoc-exercise" id="...">
    <span class="omdoc-titleword">Exercise</span>
    <p>This problem on graphs is very easy.</p>
  </div>
</div>

It would be great, if the title of the exercise would also be preserved. Would this be hard to do?

Many thanks in advance!

Attachments

test.omdoc Download (444 bytes) - added by cmueller 4 years ago.
test file

Change History

follow-up: ↓ 2   Changed 4 years ago by clange

  • status changed from new to closed
  • resolution set to fixed

OK, I've implemented (but not tested) a simple solution for this, which would render as "Exercise (The graph 1 problem)".

BTW, note that you are right to provide "pragmatic" OMDoc 1.2-style metadata here. The XSLTs do not yet support "strict" RDFa-style metadata.

in reply to: ↑ 1   Changed 4 years ago by cmueller

Replying to clange:

OK, I've implemented (but not tested) a simple solution for this, which would render as "Exercise (The graph 1 problem)". BTW, note that you are right to provide "pragmatic" OMDoc 1.2-style metadata here. The XSLTs do not yet support "strict" RDFa-style metadata.

I just ran the updated XSLT with JOMDoc jomdoc transform -x ../../xsl2/omdoc2pmml-nomobj.xsl ref-con/exam08.omdoc > xhtml/exam08.xhtml

and received the following error: jomdoc: Syntax error in stylesheet

I can provide my test file if you need it. Many thanks in advance.

follow-up: ↓ 4   Changed 4 years ago by clange

Oops, sorry, a missing namespace declaration. Now I tested it on your input (simply copies from the ticket), and it works.

in reply to: ↑ 3 ; follow-up: ↓ 5   Changed 4 years ago by cmueller

  • status changed from closed to reopened
  • resolution fixed deleted

Replying to clange:

Oops, sorry, a missing namespace declaration. Now I tested it on your input (simply copies from the ticket), and it works.

Could you please send me your test file? I don't get it to work with the attached example (test.omdoc). Many thanks in advance!!!

Changed 4 years ago by cmueller

test file

in reply to: ↑ 4   Changed 4 years ago by clange

Replying to cmueller:

Could you please send me your test file? I don't get it to work with the attached example (test.omdoc). Many thanks in advance!!!

I had to fix another bug. Now, with the latest version of the XSLT, it works with your test file.

  Changed 4 years ago by cmueller

  • status changed from reopened to closed
  • resolution set to fixed

Great! Thanks a lot for your help!!!

Note: See TracTickets for help on using tickets.