Commit c7107493 authored by Aleksei Kanash's avatar Aleksei Kanash

Fixed svg:a section. Now cff fully compatible with online validator...

Fixed svg:a section. Now cff fully compatible with online validator http://validator.imsglobal.org/iwb/index.jsp?validate=package
parent ba98d879
......@@ -1653,7 +1653,8 @@ bool UBCFFAdaptor::UBToCFFConverter::parseUBZAudio(const QDomElement &element, Q
// CFF cannot show SVG images, so we need to convert it to png.
if (bRes && createPngFromSvg(srcAudioImageFile, dstAudioImageFilePath, getTransformFromUBZ(element), QSize(audioImageDimention, audioImageDimention)))
{
QDomElement svgSwitchSection = doc.createElementNS(svgIWBNS,svgIWBNSPrefix + ":" + tIWBSwitch);
// switch section disabled because of imcompatibility with validator http://validator.imsglobal.org/iwb/index.jsp?validate=package
// QDomElement svgSwitchSection = doc.createElementNS(svgIWBNS,svgIWBNSPrefix + ":" + tIWBSwitch);
// first we place content
QDomElement svgASection = doc.createElementNS(svgIWBNS,svgIWBNSPrefix + ":" + tIWBA);
......@@ -1665,8 +1666,8 @@ bool UBCFFAdaptor::UBToCFFConverter::parseUBZAudio(const QDomElement &element, Q
svgElementPart.setAttribute(aWidth, audioImageDimention);
svgASection.appendChild(svgElementPart);
svgSwitchSection.appendChild(svgASection);
// switch section disabled because of imcompatibility with validator http://validator.imsglobal.org/iwb/index.jsp?validate=package
// svgSwitchSection.appendChild(svgASection);
// if viewer cannot open that content - it must use that:
QDomElement svgText = doc.createElementNS(svgIWBNS,svgIWBNSPrefix + ":" + tIWBTextArea);
......@@ -1679,9 +1680,11 @@ bool UBCFFAdaptor::UBToCFFConverter::parseUBZAudio(const QDomElement &element, Q
QDomText text = doc.createTextNode("Cannot Open Content");
svgText.appendChild(text);
svgSwitchSection.appendChild(svgText);
// switch section disabled because of imcompatibility with validator http://validator.imsglobal.org/iwb/index.jsp?validate=package
// svgSwitchSection.appendChild(svgText);
addSVGElementToResultModel(svgSwitchSection, dstSvgList, getElementLayer(element));
// switch section disabled because of imcompatibility with validator http://validator.imsglobal.org/iwb/index.jsp?validate=package
addSVGElementToResultModel(svgASection/*svgSwitchSection*/, dstSvgList, getElementLayer(element));
if (0 < iwbElementPart.attributes().count())
addIWBElementToResultModel(iwbElementPart);
......
......@@ -93,7 +93,7 @@ static QString aFontweight = "font-weight";
static QString aTextalign = "text-align";
static QString aPoints = "points";
static QString svgNS = "http://www.w3.org/2000/svg";
static QString iwbNS = "http://www.becta.org.uk/iwb";
static QString iwbNS = "http://www.imsglobal.org/xsd/iwb_v1p0";
static QString aId = "id";
static QString aRef = "ref";
static QString aHref = "href";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment