Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xml-dev] Choosing a target name for a processing instruction

From: "Michael Good" <musicxml@-----.--->
To: xml-dev@-----.---.---
Date: 5/2/2006 11:08:00 PM
> Why is this? Xerces can report PIs...

Well, maybe I'm doing something wrong, but when I tried to use

  ProcessingInstruction pi = doc.createProcessingInstruction("feature", "");

the result was

<?feature ?>

instead of

<?feature?>

Multiple XML parsers complained that a document using the former is
not well-formed. Maybe there's a different way to make it work, but
just adding some simple PI data seemed more robust, and it was a
trivial fix.

Unfortunately I think this is moot for this case. One application that
needs this is written in Flash ActionScript, which only handles two
types of DOM nodes: elements and text. (Attributes are handled via a
separate attributes property.) Processing instructions seem to be
discarded, no matter what the XML spec says should happen, even in
Flash 8. If I'm wrong about that, please let me know!

I think the reading application will be able to handle things by
(shudder) exploiting a side effect in how the writing application
works. It's not clean, but it may do the job until we get a MusicXML
1.2 out. That just needs to happen before the writing application
changes enough to break this side effect.

Currently we leave validation policy up to each individual
application, which has worked pretty well in practice. Because later
versions are supersets of earlier versions, it's easy to check for the
MusicXML version and just ignore any extra elements or attributes you
don't understand. The syntax and semantics of the existing DTD subset
doesn't change. If that wasn't true, perhaps we would need more
elaborate policies.

Thanks again,

Michael Good
Recordare LLC
www.recordare.com


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent