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

Allow CDATA in <t> elements #12

Closed
proycon opened this issue Aug 3, 2016 · 6 comments
Closed

Allow CDATA in <t> elements #12

proycon opened this issue Aug 3, 2016 · 6 comments

Comments

@proycon
Copy link
Owner

proycon commented Aug 3, 2016

Not sure if this is already the case.

@proycon proycon added this to the v1.3 milestone Aug 3, 2016
@proycon proycon self-assigned this Aug 3, 2016
@kosloot
Copy link
Collaborator

kosloot commented Aug 3, 2016

For now, this doesn't look to be a good or useful feature.
e.g. do we translate the CDATA into text? and what to do on output?
What does text() deliver?

Don't implement unless REALLY needed.

@proycon
Copy link
Owner Author

proycon commented Aug 3, 2016

Agreed, idea discarded, we won't implement this.

@proycon proycon closed this as completed Aug 3, 2016
@proycon proycon removed this from the v1.3 milestone Aug 3, 2016
@proycon proycon reopened this Feb 21, 2017
@kosloot
Copy link
Collaborator

kosloot commented Feb 22, 2017

Why????

@proycon
Copy link
Owner Author

proycon commented Feb 22, 2017

It's still something to investigate, as this keeps popping up, and by no means settled. I opened it in response to another user enquiry who expected he could use CDATA. I wonder to what extend strictly disallowing CDATA violates XML specs/conventions.

From W3.org: [Definition: CDATA sections may occur anywhere character data may occur; they are used to escape blocks of text containing characters which would otherwise be recognized as markup.

@kosloot
Copy link
Collaborator

kosloot commented Feb 23, 2017

Well,
Every FoLiA document is valid XML.
This does not imply that every XML construct is valid FoLiA !

My biggest concerns are:

  • does allowing CDATA mean that "empty" text is no longer forbidden?
  • if so: what should the text() of str() methods return?
  • in a CDATA you can stuff whatever you want. Base64 encode movies, pictures, scans of books...
    This doesn't help anyone using the FoLiA, imho
  • we could handle CDATA as 'garbage in, garbage out' but I am sure that users will ask for (lib)folia methods extracting or inserting such garbage. A slippery slope!
  • The danger is, that users create a minimal FoLiA with all useful stuff in CDATA and 'unreachable' for other users. Like PDF containing complete OCR images.

So: is there a concrete use case, that cannot be resolved in other ways?

@proycon
Copy link
Owner Author

proycon commented Oct 10, 2018

Closing this, idea discarded...

@proycon proycon closed this as completed Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants