Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Media type for RELAX NG Compact Syntax

Reply
Thread Tools

Media type for RELAX NG Compact Syntax

 
 
Henri Sivonen
Guest
Posts: n/a
 
      04-30-2005
I have written a servlet wrapper and a custom entity resolver for
Jing.[1] My code needs to decide whether to instantiate a compact syntax
schema reader or an XML syntax schema reader. I would very much like to
do the Right Thing. Currently, my code does the following;

1. If the HTTP Content-Type of the schema is
application/vnd.relax-ng.rnc, the schema is treated as a compact syntax
schema.

2. If the HTTP Content-Type of the schema is application/octet-stream,
the UA may guess. The implemented guess is that the schema is treated as
a compact syntax schema if its URL ends with ".rnc".

3. If the user has requested lax treatment of HTTP Content-Type and the
HTTP Content-Type is text/plain, the schema is treated as a compact
syntax schema if its URL ends with ".rnc".

In all cases, the charset parameter is supported for overriding the RNC
default UTF-16/UTF-8 sniffing. (I consider the charset parameter
harmful, but the RNC spec specifically blesses it.)

However, it seems the registration of application/vnd.relax-ng.rnc went
nowhere and the type is not official. Can anyone suggest a more correct
way of deciding if a schema acquired via HTTP should be treated as a
compact syntax schema?

(I'm inclined the consider the media type system in general and the
registration procedure in particular dysfunctional... It seems to me
that most .rng and .rnc schemas out there are served as text/plain.)

[1] http://hsivonen.iki.fi/validator/

--
Henri Sivonen
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://hsivonen.iki.fi/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Two Relax NG compact questions Manfred Lotz XML 0 02-14-2012 09:15 PM
Relax Syntax for Augmented Arithmetic? andrew cooke Python 19 01-24-2009 08:58 AM
Compact Flash type I and type II elliot Digital Photography 34 02-21-2008 05:42 PM
I Gb compact flash vs 512Mb (or even 256) compact flash Rick S. Digital Photography 33 09-13-2004 09:07 AM
Okay... compact film vs compact digital .. Mike Henley Digital Photography 15 06-22-2004 07:32 PM



Advertisments