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

Make it possible for JQTI+ to identify XHTML nodes #64

Open
schmod opened this issue Jun 4, 2015 · 1 comment
Open

Make it possible for JQTI+ to identify XHTML nodes #64

schmod opened this issue Jun 4, 2015 · 1 comment

Comments

@schmod
Copy link

schmod commented Jun 4, 2015

Would it be possible (or sensible) to add some sort of annotation or interface to the XHTML-derived nodes so that users of JQTI+ can determine the QTI elements that can be cleanly mapped to XHTML elements?

While the specification describes these elements as being a subset of XHTML, they are still a part of the QTI namespace, and the XSD does not provide any indication that they extend or derive from similar XHTML elements.

As a result of this, it becomes surprisingly difficult to perform seemingly-simple operations, eg. extracting the HTML content from a <simpleChoice>, while discarding any non-XHTML elements such as <feedbackInline> that are contained within the choice.

If this sounds like a desirable feature, I'd be willing to take a stab at an initial implementation.

@davemckain
Copy link
Owner

Hi there! That does sound like a useful feature to have, and hopefully shouldn't be too difficult to implement.

If you're willing to have a go at implementing this then that would be great. I guess you might want to create a marker interface called uk.ac.ed.ph.jqtiplus.node.XhtmlElement and then have the various XHTML classes implement it. (There are quite a lot so it might be a bit tedious. The class hierarchy gets a bit more complex than the QTI spec in places due to Java's single inheritance restriction.)

You may also want to look at adding some new methods to uk.ac.ed.ph.jqtiplus.utils.QueryUtils to perform the types of searches you suggested.

Does that sounds reasonable enough? Please do give a shout if you need any more from me and thanks for offering to help out.

Regards,
David,

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

2 participants