Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The example QTI item sample doesn't pass the schema definition #9

Open
lakuri opened this issue Feb 1, 2024 · 3 comments
Open

The example QTI item sample doesn't pass the schema definition #9

lakuri opened this issue Feb 1, 2024 · 3 comments

Comments

@lakuri
Copy link

lakuri commented Feb 1, 2024

The sample provided on the github repository fails the schema validation. This is because there is a MimeTypeDType validation on the type attribute of qti-stylesheet .
The regular expression being used is [\p{IsBasicLatin}-[()<>@,;:\\"/\[\]?=]]+/[\p{IsBasicLatin}-[()<>@,;:\\"/\[\]?=]]+
I tried by updating the regex formula and then validating XML. That validates the XML successfully.

Sample item : https://github.com/1EdTech/qti-examples/blob/master/qtiv3-examples/packaging/BBQsTest/id-be3cd3bdd3d4/order-mountains.xml
Specified schema definition: https://purl.imsglobal.org/spec/qti/v3p0/schema/xsd/imsqti_asiv3p0_v1p0.xsd
Failing xml:
<qti-stylesheet href="flickrMash.css" type="text/css"/>
image

Is the regular expression wrong or am I missing something?

Steps to reproduce:

image
@paulgrudnitski
Copy link
Collaborator

That's interesting.

I don't have a validation problem when I validate with a schema-validating tool like Saxon, or with the built-in Eclipse XML validator.

What is the "plugin" that you are using? Is it XMLSpy? If not, I wonder if XMLSpy throws a validation error on this.

There are additional examples of the use of <qti-stylesheet ... type="text/css" /> in QTI Conformance and I've never encountered this problem (again, using Saxon or Eclipse), so I don't know what to make of this.

@rddyck
Copy link
Collaborator

rddyck commented Feb 2, 2024

FYI. I was able to validate this xml file successfully using XMLSpy Professional 2020 for Windows:
https://github.com/1EdTech/qti-examples/blob/master/qtiv3-examples/packaging/BBQsTest/id-be3cd3bdd3d4/order-mountains.xml

@padraig-ohiceadha
Copy link
Collaborator

That regexp uses character subtraction which a lot of regexp libraries don't support. That might explain why it woks in some tools and not in others.
It might be useful to see if the regexp could be rewritten to not make use of character subtraction.
Regexp Character Subtraction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants