Media type for RELAX NG Compact Syntax

Discussion in 'XML' started by Henri Sivonen, Apr 30, 2005.

  1. 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://hsivonen.iki.fi/
     
    Henri Sivonen, Apr 30, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jari Kujansuu
    Replies:
    0
    Views:
    829
    Jari Kujansuu
    Sep 4, 2003
  2. Johann C. Rocholl
    Replies:
    1
    Views:
    351
    Diez B. Roggisch
    Feb 4, 2005
  3. Mike Joyce
    Replies:
    3
    Views:
    3,184
    Gordon Rainsford
    May 3, 2006
  4. andrew cooke

    Relax Syntax for Augmented Arithmetic?

    andrew cooke, Jan 18, 2009, in forum: Python
    Replies:
    19
    Views:
    521
    Steve Holden
    Jan 24, 2009
  5. Manfred Lotz

    Two Relax NG compact questions

    Manfred Lotz, Feb 14, 2012, in forum: XML
    Replies:
    0
    Views:
    739
    Manfred Lotz
    Feb 14, 2012
Loading...

Share This Page