- From: James Ingram <j.ingram@netcologne.de>
- Date: Wed, 23 Nov 2016 12:06:21 +0100
- To: Nikos Andronikos <Nikos.Andronikos@cisra.canon.com.au>
- Cc: www-svg <www-svg@w3.org>, "Dr. Olaf Hoffmann" <Dr.O.Hoffmann@gmx.de>
>> Namespaces and file types are closely related concepts, but I'd >> prefer not to have to override the namespace declaration. Is there a >> better alternative? > You could use a custom data attribute on the SVG element to indicate > that this file is your own particular variant of SVG and must conform > to your schema - which could be defined and documented elsewhere for > producer/consumer apps. > https://www.w3.org/TR/SVG2/struct.html#DataAttributes > > Nikos. Yes, of course! Thanks for the tip. According to the above link, ...custom data attributes...are...in no namespace... , which is exactly what I want. :-) As with a namespace declaration, I think the value of the custom data attribute should still be a URL pointing at a description of the format. So instead of writing xmlns:musicSVG1="http://www...../musicSVG1.html." I'd write something like data-type="http://www...../musicSVG1.html" @Nikos: Three questions: 1. Are there any (anti)preferences for the custom data attribute name? 2. Am I right in thinking that there's no way to write a machine-readable schema (.xsd) for my specialised SVG type? 3. Am I right in thinking that there's no way to write a machine-readable schema (.xsd) for the information in my MIDI data namespace? Files that conform to the musicSVG1 specification do not necessarily contain any MIDI data, so these two specs need to be documented separately, and (if I can't write the corresponding machine-readable schemas) they need independent file verifiers . Basic SVG is verified automatically by referring to xmlns="http://www.w3.org/2000/svg" The musicSVG1 verifier would only verify the SVG specialisation. It can ignore anything in the MIDI data namespace. The MIDI data verifier would only look at elements containing elements or attributes from the MIDI data namespace. @Olaf: Thanks very much for sharing your thoughts on this problem but, as you see, the final answer looks a bit different. As you said, these things all hang together, so maybe you could use something like the above solution in your own domain (poetry etc.). :-) All the best, James -- http://james-ingram-act-two.de https://github.com/notator
Received on Wednesday, 23 November 2016 11:06:59 UTC