473,385 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Media type for RELAX NG Compact Syntax

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
hs******@iki.fi
http://hsivonen.iki.fi/
Jul 20 '05 #1
0 1092

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Olivier Hoarau | last post by:
Hello, I have to validate a xml file, for that I use libxml and its function xmllint which needs the RELAX NG "full" schema of the file. I have only its RelaxNG compact schema, I have to...
16
by: gaudetteje | last post by:
I just read in the 'What's New in Python 2.4' document that the None data type was converted to a constant: http://python.org/doc/2.4/whatsnew/node15.html """ # None is now a constant; code...
6
by: Pieter | last post by:
I've read a lot of posts on "why relax ng is so very good" and on "why w3c xml schema should be the only schema language". I'm, however, still not clear on why I should prefer one over the other. ...
3
by: Mike Joyce | last post by:
I am trying to write a portable script that will find removable media, such as compact flash, sd card, usb, etc. drive and then upload files from the media. I want this to be portable so that I can...
4
by: withtape | last post by:
Somebody please, please help me. I'm getting started using Relax NG to describe document schemas. After reading the grammar summarized by http://www.relaxng.org/spec-20011203.html (Section 5), I...
0
by: The xmlBlueprint Team | last post by:
Dear community, xmlBlueprint XML Editor 4.2.0902 is now available for free download at: www.xmlblueprint.com/Download.htm. This release adds support for Relax NG Schemas: Syntax Coloring,...
0
by: zgolus | last post by:
To avoid reinventing a wheel I'd like to ask you if you have heard about something what can parse Relax NG schema (XML or compact - I don't care) in such a way that when I "ask" it about certain...
0
by: Konrad | last post by:
Hi everyone. I've got problem with converting xml file to xsd schema. The Xml file looks like: <?xml version="1.0" encoding="iso-8859-2"?> <rss version="2.0"...
0
by: kplazinski | last post by:
Hi everyone. I've got problem with converting xml file to xsd schema. The Xml file looks like: <?xml version="1.0" encoding="iso-8859-2"?> <rss version="2.0"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.