-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add an XSD #273
base: main
Are you sure you want to change the base?
Add an XSD #273
Conversation
Also define restrictions (prohibited and required attributes) properly.
just note, all http://www.w3.org/ns are automatically redirected to https |
Are you suggesting that the Namespaces in the spec should be changed to |
Was too heavy handed before in removing them, I think they are permitted in DAPT. But out of line animation still isn't allowed!
Explain the structure of the XSD, and how to use it.
Also sort DAPT metadata by attributes and then elements , each alphabetically. EBU-TT Metadata is imported by git submodule.
@nigelmegitt we have been testing with some XML output of our TTAL converter and getting some errors like:
My memory of XSD is blurry but looking at the schemas, I don't see where onScreen is explicitly allowed on |
Thanks @cconcolato , looks like I was too keen on stripping out TTML2 region binding that we didn't mean to prohibit, so I have restored that in ff2d5ca. Also explicitly added I can't reproduce the unexpected layout element error, so if that persists for you, please could you share the document that's failing validation? |
The Timed Text Working Group just discussed
The full IRC log of that discussion<nigel> Subtopic: Add an XSD #273<nigel> github: https://github.com//pull/273 <nigel> Nigel: I opened this PR on 15th November <nigel> .. It adds an XML Schema 1.0 XSD to the DAPT repo <nigel> .. No change to the spec. Not normative, just editorial. <nigel> .. But useful nonetheless. <nigel> .. Cyril, you tried it and found some issues, which I think I've fixed. <nigel> .. How's it looking? <nigel> Cyril: I haven't had a chance to test the latest fixes but they probably will work. <nigel> .. My feedback is: I misunderstood at first when I looked at the folder. <nigel> .. I thought the TTML ones were pure copies, but you've actually modified them. <nigel> .. Would be good to have a README or a description. <nigel> Nigel: I actually added a README for that exact reason! <nigel> Cyril: Oh, fine, I should have looked! <nigel> Nigel: I agree, it could catch people out. <nigel> .. Also the need to check out recursively because it uses a git submodule for the EBU-TT metadata. <nigel> Cyril: Does that have an example or a list of tools that could be used? <nigel> .. I used XMLLint and it would not recognise some constructs in the XSD so I had to change. <nigel> Nigel: Do you know what it didn't recognise? <nigel> Cyril: There was a dapt.xsd and a dapt-all.xsd, and the dapt-all uses a mix of include and import. <nigel> .. I had to use the dapt.xsd. <nigel> Nigel: Ah, dapt-all brings other XSDs in by namespace alone and depends on your tool config. <nigel> .. Maybe we should remove dapt-all. <nigel> Cyril: Would it produce false positives or false negatives? <nigel> Nigel: If your tool is configured to point at the unmodified TTML XSDs for the TTML namespace then <nigel> .. it might successfully validate constructs that are prohibited in DAPT. <nigel> Cyril: I'd agree with your suggestion to remove dapt-all then. <nigel> Nigel: I used XSD 1.0 because there are more free tools available that use it. <nigel> .. It's restricted compared to XSD 1.1 and makes it harder to constrain or apply additional rules <nigel> .. based on an unmodified TTML XSD. <nigel> SUMMARY: @nigelmegitt to remove dapt-all and modify the README to match <nigel> [group discussion of the merits of different types of validation tool] <nigel> Cyril: For the community in general, a validation tool is super useful. <nigel> Nigel: Very much so, and Ben Poor from EBU's Eurovox used the XSD to find an issue with some DAPT <nigel> .. that the tool was generating, so it showed its value within a day. |
As discussed in today's TTWG meeting - notes via w3c/ttwg#296
Agenda+ for 2024-12-19 TTWG call to see if anyone has any recommendations for validation tools or approaches using the XSD |
The Timed Text Working Group just discussed
The full IRC log of that discussion<nigel> Subtopic: Add an XSD #273<nigel> github: https://github.com//pull/273 <nigel> Cyril: I thought there would be a quick way to run a command line tool to validate <nigel> .. a document against an XSD. <nigel> .. I didn't find one. <nigel> .. Maybe we should document that for people <nigel> Nigel: I still feel sure there are command line tools. <nigel> .. I found a python library called xmlschema and another Java app that wraps native Java <nigel> .. functionality that should do it. <nigel> .. It's really easy to write a few lines of python to validate against the schema, <nigel> .. so one option is to create a validator and put it in the repo, or in a separate repo. <nigel> .. What's most useful here? <nigel> Cyril: If I struggle, others would too. Obviously you can write a wrapper around a library, <nigel> .. and people might not be confident. <nigel> .. I agree, if you have a python wrapper it would help people. <nigel> .. Could be in the same repo, I don't know. <nigel> Andreas: Usually a command line utility would work. I'm not sure what's wrong with this schema. <nigel> Cyril: I tried xmllint and it didn't work. Saxon EE may have it, but Saxon HE doesn't. <nigel> Andreas: Saxon EE definitely, it's well known, but it's not a free tool. <nigel> .. I can also check. As you say, it's not only an issue for DAPT but all other TTML schemas. <nigel> .. Pierre, you are also implementing an online schema validator, right? <nigel> Pierre: Yes, just the Java one. It's a wrapper. <nigel> .. Very few command line validators work with more than one XSD. <nigel> .. If you have dependencies between XSDs it's much harder. <nigel> .. Online is best, right, because it's easiest for people to run. <nigel> .. But a command line wrapper that includes all the XSDs and loads them properly is probably easiest for the end user. <nigel> Nigel: If it's going to help validate the PR I can add a few lines of Python and install instructions <nigel> .. into the repo. <nigel> Cyril: I support that. <nigel> SUMMARY: @nigelmegitt to add a validator script that uses the XSD <nigel> Nigel: Any other recommendations for command line validators also very welcome! |
Closes #272 by adding an XSD based on the TTML2 XSD (by copy rather than reference) and making additions and modifications as needed to meet the constraints of DAPT.
With thanks to @magicbadger for his help and content while developing this.