473,625 Members | 3,330 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Validate XML with RELAX NG

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 transform it first in Relax NG
"full".
To transform RelaxNG compact to RelaxNG "full", I use rnc2rng written in
Python. I have some difficulties, the file I obtain from a RELAXNG
compact file is not conform.

Is there someone in this newsgroup who knows this tools ?
Olivier

PS: Excuse for my poor english
Jul 18 '05 #1
1 2753
On Thu, 13 Nov 2003 14:38:33 +0100,
Olivier Hoarau <ol************ @mortauxspams.b z> wrote:
To transform RelaxNG compact to RelaxNG "full", I use rnc2rng written in
Python. I have some difficulties, the file I obtain from a RELAXNG
compact file is not conform.


Use Trang instead; rnc2rng doesn't seem to be complete as it fails on the
RNC schema for RNG full, for example. See http://www.amk.ca/notes/rng.html
for a little two-line wrapper script for Trang.

If you must have a pure Python solution, you're going to have to roll up
your sleeves and fix rnc2rng.

--amk
Jul 18 '05 #2

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

Similar topics

6
2484
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. I've made a small list of some good and bad points of both. These points don't really go into the grammar aspects of these languages, but are more about secondary aspects. The grammar aspects are different, but both are suitable for validating...
1
1869
by: Duane Morin | last post by:
I fear this might be a FAQ but I can't figure out how to google for it. Recently we had a big bug where the source that an XSL file acted on changed out from under it. Result, the XSL matched nothing and important content did not make it to the final destination. I was under the impression that an XSL could be told "You will be acting on an XML that is valid according to the following DTD." Thus, if the XML that it was applied...
4
1314
by: J David Eisenberg | last post by:
One of the students in my XML class is asking what the purpose of validating is in the context of a web application. He's trying to figure out how he would use XML Schema or Relax NG and associated tools to validate input from a web form. This is the wrong approach, since that input isn't XML at all. I've told him that any XML validation would most likely occur at the server side, when servers have to transfer data that is in XML...
1
1685
by: Jim Di Griz | last post by:
Hi I have a problem to create an XSD that prevents overlapping ranges. Sample XML: <root> <element LowerLimit="1" UpperLimit="50000"> ..... </element>
4
1612
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 conclude that the following is a valid Relax NG schema: <grammar xmlns="http://relaxng.org/ns/structure/1.0"> <start> <attribute name="wtf"/> </start> </grammar>
4
1485
by: Lord0 | last post by:
Hi there, Would like to conditionally validate XML i.e. If element <ElementAhas a particular value then element <ElementBmust have a particular value I'm pretty sure I can't do this this with a Schema..... I know I could use an XSLT to check the values of <ElementAand
3
1753
by: Lord0 | last post by:
I *think* I need to be able to validate subsets of an XML document using different schema. The functionality I'm trying to implement is this. a) External suppliers produce an XML document containing multiple User records. The external supplier validates this entire document using schema 1. This document is then uploaded to our system. b) Our system then checks that the supplied document "looks okay", minimally, using Schema 2. Schema...
5
2021
by: Laszlo Nagy | last post by:
Do you know an open source lib that can do $subject? Thanks, Laszlo
2
1732
by: McSwell | last post by:
We have a small (~50 line) DTD and a slightly larger (~300 line) W3C schema that we need to convert to Relax NG. (And I have a larger W3C schema that I may some day convert.) I was hoping that there would be some tools to get us started, but the list at http://relaxng.org/#conversion is not too promising. The one tool that looks like it would actually do such a conversion, the Sun RELAX NG Converter, appears to have disappeared from the...
0
8189
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.