Re: [jats-list] how to identify a XML file as JATS

Subject: Re: [jats-list] how to identify a XML file as JATS
From: Matteo Gamboz <gamboz@xxxxxxxxxxxxxxxxx>
Date: Wed, 25 Sep 2013 10:05:35 +0200
Hi Gerrit,
 the "xml-model" PI may be what I was looking for.

I'm still a bit puzzled about the DOCTYPE. I thought that it served
the purpose of xml-model, but, as you say, it applies only to dtd
files (I thought that the "DTD" in the specs meant any schema language

By the way, I'm quite happy validating with emacs and rnc files.
I only wanted to say that emacs seems to ignore the DOCTYPE, since,
once the schema is set, the DOCTYPE doesn't change the result of the
validation (thanks for the useful tips though).  :-)

I'm also a bit worried that xml-model seems to be a work-in-progress
(, but I suppose I can live
with that.

Thanks a lot

On Tue, Sep 24, 2013 at 07:11:09PM +0200, Imsieke, Gerrit, le-tex wrote:
> Otherwise, you may use the xml-model processing instruction after
> the XML declaration in order to associate a Relax NG schema with the
> XML file, like this:
> <?xml-model href="file:/c:/cygwin/home/gerrit/XML/JATS/schema/JATS_Archiving_1.0/rng/JATS-archivearticle1.rng"
> type="application/xml"
> schematypens="";?>
> But few applications honor this PI. oXygen XML editor is a notable
> exception.
> You donbt have to include a schema declaration at all in the file.
> You just invoke jing with the schema and the file location.
> If the DOCTYPE declaration is present, most XML parsers will look
> for the DTD in order to resolve named entity references. You may not
> supply a schema of another type than DTD in the DOCTYPE declaration.
> But you may well drop the DOCTYPE declaration altogether.
> If you use xlink:href attributes in the document, you may need to
> declare xmlns:xlink=""; in your document
> which didnbt seem to be necessary with the DTD (to my surprise).

Current Thread