-
Notifications
You must be signed in to change notification settings - Fork 147
XML qname parses correctly but is not serialized correctly. #228
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
Comments
For the syntax of a QName, https://www.w3.org/TR/REC-xml/ says that a local name for a qname is a Name less colon. A Name is defined here: https://www.w3.org/TR/REC-xml/#NT-Name. There's almost nothing illegal in that set of characters except colon, control characters, and unassigned code points (and as far as I can see the latter are merely discouraged, not illegal). |
I see this is still open. https://www.w3.org/TR/xml-names11/#NT-NCName explicitly states that "." is included in NCName which is part of a Prefix. The fix is simple: In rdflib/src/serializer.js:196: Any chance this could get addressed? |
@bourgeoa: Understood. But it seems like anything that relies on considering valid QNames as invalid would be incorrect and should also be addressed. Otherwise, is this something that could be addressed in a future release or do I need to fork? IBM Engineering Workflow Manager (formerly Rational Team Concert) makes heavy use of prefixes that contain dots. |
Error: Invalid character "." cannot be in XML qname for URI: http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/com.ibm.team.apt.attribute.acceptance
at Serializer.qnameMethod (/Users/jamsden/GitHub/rdflib.js/lib/serializer.js:913:17)
at Serializer.subjectXMLTreeMethod (/Users/jamsden/GitHub/rdflib.js/lib/serializer.js:819:13)
at Serializer.statementListToXMLTreeMethod (/Users/jamsden/GitHub/rdflib.js/lib/serializer.js:736:22)
at Serializer.statementsToXML (/Users/jamsden/GitHub/rdflib.js/lib/serializer.js:931:16)
at Object.serialize (/Users/jamsden/GitHub/rdflib.js/lib/serialize.js:27:29)
According to https://www.w3.org/TR/REC-xml/#NT-Name, NCName can contain ".". So the serializer should handle these QNames.
The text was updated successfully, but these errors were encountered: