Objet:
Re: MusicXML and XML Schema
Date:
Fri, 11 May 2001 18:38:04 +0200
De:
Gerd Castan <Gerd.Castan@z.zgs.de>
A:
Karim Barkati <barkati@edite-de-paris.com.fr>
Références:
1
Hi Karim,
Karim Barkati wrote:
Hello,
>I'm a french student begining to work with Nabil Bouzaienne, who
Yes, he had an interesting website about the topic.
>developped a music editor applet. I find your site very instructive,
I
>often visit it, but I'd like to have your opinion on some specific
>questions.
>I'm working on a project of musical scores representation for
the web. I
>chose to use use XML to represent semantic datas, XSL to store
graphical
>informations, SVG to print the final scores, and java to convert
XML
>files into SVG, as MusiqueXML tries to do in C++. The first
problem is
So you are exactly doing what I do [;-)]
>that I don't find free XML editors for Linux, while I looked
for on
>xmlsoftware.com and megginson.com. The second is that I'm not
sure the
I installed Linux yesterdy (the first time) so I don't know very much
about it.
Three suggestions:
- Use emacs in SGML mode
- Look for an editor in Java
- Use a simple text editor.
I did it the last way for a long time. It has the advantage that you
will
get a very stable and instructive error handling code because it is
heavyly tested.
But this is too much effort if you just want to make a technology
demonstration for
university.
>choices I made are the best: I don't know whether MusicXML is the best
You are talking about MusicXML from Michael Good?
>format avaible today, nor it is a good idea to try to translate
it in an
>XML Schema instead of its sets of DTDs.
>Any advices are welcome.
>Of course, I shall let you know about my future developments.
The one big difference between MusiXML and all other formats is that
the
data model
itself defines different views (score, parts) to the core data. This
is
much more maintainable
for a user but also harder to handle by a program. this is the main
point that you have to
understand and decide.
Best regards,
Gerd
svg2pdf:
http://www.digapp.com/newpages/svg2pdf.html
SVG2PDF will run on MacOS, Windows 95/98/2000 and NT, it will convert
an
SVG document into a PDF document that can then be viewed by anyone
using
Adobe Acrobat or similar products.
Part 2: Transforming XML into SVG:
http://www-106.ibm.com/developerworks/education/transforming-xml/xmltosvg/index.html
Welcome to the Apache XML Project:
http://xml.apache.org/
Xerces - XML parsers in Java, C++ (with Perl and COM bindings)
Xalan - XSLT stylesheet processors, in Java and C++
Cocoon - XML-based web publishing, in Java
FOP - XSL formatting objects, in Java
Xang - Rapid development of dynamic server pages, in JavaScript
SOAP - Simple Object Access Protocol
Batik - A Java based toolkit for Scalable Vector Graphics (SVG)
Crimson - A Java XML parser derived from the Sun Project X Parser.
Xerces Java Parser 1.3.1 Release:
http://xml.apache.org/xerces-j/
The Xerces Java Parser 1.3.1 supports XML 1.0 recommendation and contains
advanced parser functionality, such as XML Schema, DOM Level 2 version
1.0, and
SAX Version 2, in addition to supporting the industry-standard DOM Level
1 and
SAX version 1 APIs.
Note that because some of the standards are still not complete, the stable
API will
definitely be different from its current form in Xerces-J 1.3.1. This is
your chance to
give us feedback on the features that are important to you, and let us
know whether
the APIs that we are providing are the right ones. Please direct your feedback
to the
Xerces-J mailing list.
Xerces: XML parsers in Java and C++ (plus Perl and COM)
Xerces (named after the Xerces Blue butterfly) provides world-class XML
parsing and generation.
Fully-validating parsers are available for both Java and C++, implementing
the W3C XML and DOM
(Level 1 and 2) standards, as well as the de facto SAX (version 2) standard.
The parsers are highly
modular and configurable. Initial support for XML Schema (draft W3C standard)
is also provided.
A Perl wrapper is provided for the C++ version of Xerces, which allows
access to a fully validating
DOM XML parser from Perl. It also provides for full access to Unicode strings,
since Unicode is a key
part of the XML standard.
A COM wrapper (also for Xerces-C) provides compatibility with the Microsoft
MSXML parser.
Xalan: XSL stylesheet processors in Java & C++
Xalan (named after a rare musical instrument) provides high-performance
XSLT stylesheet processing.
Xalan fully implements the W3C XSLT and XPath recommendations. The stylesheet
processor is
feature-rich and robust. The XPath Processor is useable as a stand-alone
unit. Xalan uses the Bean
Scripting Framework (BSF) to implement Java or script extensions, features
multiple document output
extensions, and we are working on data-binding extensions for SQL/JDBC
and other data providers.
Xalan is currently available in Java, and available in Alpha form for C++.
Xalan:
http://xml.apache.org/xalan-j/
Xalan is an XSLT processor for transforming XML documents into HTML,
text, or other
XML document types. It implements the W3C Recommendations for
XSL
Transformations (XSLT) and the XML Path Language (XPath). It can be
used from the
command line, in an applet or a servlet, or as a module in other program.
Refonte des fichiers:
http://perso.club-internet.fr/barkazik/
Frappe des notes sur java.
Processeurs validant et non-validant (bien-formés)
XML Parser for Java.
http://www.alphaworks.ibm.com/formula/xml
The XML Parser for Java Version 3.1.1 Release (XML4J-3_1_1)
is now available. This release contains public and stable
support of the DOM Level 1, and SAX Level 1 specifications.
It also contains implementations of the DOM Level 2, SAX
Level 2 implementations, and partial April 7 W3C Schema
implementations but these are considered experimental, as the
specifications themselves are still subject to change.
XML4J-3_1_1 contains a number of optimizations designed
to improve performance as compared with
XML4J-3_1_0. It is also more robust with regard to thread
safety. In all other respects, XML4J-3_1_1 behaves
like XML4J-3_1_0.
XML4J_3_1_1 is a source and binary release and is covered by the standard Apache 1.1 license.
IBM is major contributor to Apache's Xerces-J code base,
which is the basis for XML4J version 3. IBM
is a pioneer in XML technologies, with parsers that have
been consistently highly rated since XML4J
version 1.0 was released in 1998.
Batik pour SVG:
file:/home/barkati/MusiqueXML/batik/batik-1.0beta2/docs/svggen.html
Unleashed p151:
CSS can be used to style HTML documents, while XSL cannot.
XSL can be used to transform XML documents, while CSS cannot.
Objet:
Re: A musical stylesheets system
Date:
Wed, 16 May 2001 19:42:21 +0200
De:
Gerd Castan <Gerd.Castan@z.zgs.de>
A:
Karim Barkati <barkati@edite-de-paris.com.fr>
Références:
1 , 2 , 3
Karim Barkati wrote:
I don't know what a musical stylesheet is. I (will) use XSLT to produce
SVG. my XSLT
doesn't know much about musical notation, just how to convert an
abstract graphical
representation to SVG. The main part is Java in the servlet.
>moment, I have chosen to use Mickael Good's format, even if it's
a set of
>DTDs instead of a schema. Anyway, schemas are not finished yet,
and DTD
XML Schema is almost two weeks old ;-)
>tools
>are mature. Do you think using MusicXML is a bad idea?? ;o)
It seems to me
>that's the best because it's very complete at the semantic level
(notes,
>instruments, parts, voices, beams, slurs, ties, keys, alterations,
>directions, barlines, etc), and also besause it's bidimensionnal:
partwise
Correct. probably more complete than mine. I think mine is structural
more complete (this means
that mine covers cases where you can't just add an attribute but you
have to break the data model
in an incompatible way if you use MusicXML).
>and timewise, I found it clever. I won't use any graphic (xy position)or
Yes, it's very interesting and a nice use of XSLT.
>Tell me if I wrong, but I think MusicXML also defines these different
views:
>opus, score, parts. You said he was aware of your work when
he developped
No, these are not views. I borrowed the word view from databases / SQL,
not the OO word view.
>for APIs to parse the XML files. Do you know something about
SAX (or SAX2)
>versus JAXP, JAXB, etc.? For SVG, I intend to use batik's APIs.
>
JAXP is a parser independant way to access SAX/SAX2/DOM/XSLT
Best Regards,
Gerd
SAX supports low-overhead, event-based processing, and DOM represents
the result of parsing in a tree data structure that can be used with XML
(or HTML).
URI (Universal Ressouce Indentifier) = URL (UR Locator) + URN (UR Name)
SAX = an interface org.xml.sax.Parser + a class with static methods
org.xml.sax.helpers.ParserFactory
Writting Application FAQs:
http://xml.apache.org/xerces-j/faq-write.html
How do I create a DOM parser?
import org.apache.xerces.parsers.DOMParser;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
import java.io.IOException;
...
String xmlFile = "file:///xerces-1_3_1/data/personal.xml";
DOMParser parser = new DOMParser();
try {
parser.parse(xmlFile);
} catch (SAXException se) {
se.printStackTrace();
} catch (IOException ioe) {
ioe.printStackTrace();
}
Document document = parser.getDocument();
DSO: XML Data Source Object
OMG IDL: Object Management Group Interface Definition Language
obsolète = deprecated (n/a)
[barkati@ceres dom]$ java -version
java version "1.3.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)
[barkati@ceres dom]$ java DOMCount readme.xml
Exception in thread "main" java.lang.NoClassDefFoundError: DOMCount
(wrong name: dom/DOMCount)
at java.lang.ClassLoader.defineClass0(Native
Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native
Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)