Skip to content
Snippets Groups Projects
Commit ca978b00 authored by srosse's avatar srosse
Browse files

OO-2247: replace label with span by import

parent ab1ebed4
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ import org.xml.sax.ext.DefaultHandler2; ...@@ -40,7 +40,7 @@ import org.xml.sax.ext.DefaultHandler2;
* @author srosse, stephane.rosse@frentix.com, http://www.frentix.com * @author srosse, stephane.rosse@frentix.com, http://www.frentix.com
* *
*/ */
public class OnyxToQtiWorksHandler extends DefaultHandler2 { public class OnyxToQtiWorksHandler extends DefaultHandler2 {
private final XMLStreamWriter xtw; private final XMLStreamWriter xtw;
...@@ -105,8 +105,13 @@ public class OnyxToQtiWorksHandler extends DefaultHandler2 { ...@@ -105,8 +105,13 @@ public class OnyxToQtiWorksHandler extends DefaultHandler2 {
rubricBlock = false; rubricBlock = false;
rubricCharacterBuffer = null; rubricCharacterBuffer = null;
} }
if("label".equals(qName)) {//convert label which are not part of QTI 2.1 standard to span
xtw.writeStartElement("span");
} else {
xtw.writeStartElement(qName);
}
xtw.writeStartElement(qName);
if("imscp:resource".equals(qName)) { if("imscp:resource".equals(qName)) {
int numOfAttributes = attributes.getLength(); int numOfAttributes = attributes.getLength();
for(int i=0;i<numOfAttributes; i++) { for(int i=0;i<numOfAttributes; i++) {
...@@ -136,6 +141,8 @@ public class OnyxToQtiWorksHandler extends DefaultHandler2 { ...@@ -136,6 +141,8 @@ public class OnyxToQtiWorksHandler extends DefaultHandler2 {
} else if("prompt".equals(qName)) { } else if("prompt".equals(qName)) {
prompt = true; prompt = true;
} }
} catch (XMLStreamException e) { } catch (XMLStreamException e) {
throw new SAXException(e); throw new SAXException(e);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment