I produced with TEI - Roma my schema (Relax NG). As I used "Oxygen", it was ok to validate the file, there is association to this schema: <?oxygen RNGSchema="myTEI.rnc" type="compact"?>
now I wanted to use XML Copy Editor, and the validation with Relax NG does not work …
- ok, the association can be made only for Oxygen, but how do I associate the XML document inside of XML Copy Editor with my Relax NG Schema? there are Options only for DTD and XML Schema … any plugin?
As I tried the validation with the "Oxygen-Association" - I got the message, that the programme could not load the schema.
any ideas? tips?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I too have oXygen (provided to me at my new job) and have validated the same document in both oXygen and XML-CE against a Relax NG schema.
What I found was that I needed to have the schema in the XML syntax for XML CE. Since it had come in the compact syntax — with the .rnc extension — I converted it with Trang to .rng format and the validation worked very well in XML CE.
The biggest problem I had in all of this was writing an XML Catalog that worked properly with oXygen (which is why I was trying to validate it in XML CE as well). I found it much easier to modify the catalog.xml file in XML CE, its use being simpler in this app.
As far as I know, XML CE doesn't have a mechanism for recording which Relax NG schema(s) should be used to validate which XML document(s).
Until there's a standard way of representing this, perhaps we should petition Gerald to accept an XML CE pi similar to oXygen's that would let a user specify schema language, filename and any other necessary information (such as "compact" syntax with Relax NG).
Roger Sperberg
firstinitial lastname at gmail
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
(sorry, I write a bigger answer, I describe, what I did now, maybe I do some mistake in using XML CE, but the work looks difficult to me, I am used to use Oxygen till now)
well, I created with Roma new schema in xml syntax (myTEI.rng).
In the xml-file I deleted the association created in Oxygen (<?oxygen RNGSchema="myTEI.rnc" type="compact"?>) than tried to associate the new schema, and (in XML CE: XML > Associate > XML Schema) and my <TEI>-Element was changed to this form:
I dont understand, why the program uses absolut path, when I save the file and send it to my colleague in the project, the validation will not work :-/ I dont want to say, that they would not recognize the problem, but the "problem" is, that they have to modify the <TEI>-Element and associate the schema again, because they use Oxygen.
and … than next step in Validating the file: XML > Validate > Relax NG - I selected the new .rng schema, but there is error message: "Error at line 2: Expecting a namespace for element TEI" …
so I added the namespace declaration xmlns="http://www.tei-c.org/ns/1.0" but the error message is now:
"Error at line 2: Invalid attribute noNamespaceSchemaLocation for element TEI"
well … I deleted the "noNamespaceSchemaLocation" with attribut and … the file is as valid recognised
it is quiet hard way to validate a file in comparison to oxygen :-(
my second try to validate is, without the association-tag and the <TEI> looks like this:
"<TEI xmlns="http://www.tei-c.org/ns/1.0">"
than F6 to validate with the selected relax NG (.rng) schema → it works
because I need to have two files opened and validate them, I opened the second file, I let all the tags as the oxygen crreated them (the assotioation tag to ".rnc" (!)) and than I pressed F6 - the document is valid (well, important is here not, if it is valid, but that the validation works)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I produced with TEI - Roma my schema (Relax NG). As I used "Oxygen", it was ok to validate the file, there is association to this schema: <?oxygen RNGSchema="myTEI.rnc" type="compact"?>
now I wanted to use XML Copy Editor, and the validation with Relax NG does not work …
- ok, the association can be made only for Oxygen, but how do I associate the XML document inside of XML Copy Editor with my Relax NG Schema? there are Options only for DTD and XML Schema … any plugin?
As I tried the validation with the "Oxygen-Association" - I got the message, that the programme could not load the schema.
any ideas? tips?
I too have oXygen (provided to me at my new job) and have validated the same document in both oXygen and XML-CE against a Relax NG schema.
What I found was that I needed to have the schema in the XML syntax for XML CE. Since it had come in the compact syntax — with the .rnc extension — I converted it with Trang to .rng format and the validation worked very well in XML CE.
The biggest problem I had in all of this was writing an XML Catalog that worked properly with oXygen (which is why I was trying to validate it in XML CE as well). I found it much easier to modify the catalog.xml file in XML CE, its use being simpler in this app.
As far as I know, XML CE doesn't have a mechanism for recording which Relax NG schema(s) should be used to validate which XML document(s).
Until there's a standard way of representing this, perhaps we should petition Gerald to accept an XML CE pi similar to oXygen's that would let a user specify schema language, filename and any other necessary information (such as "compact" syntax with Relax NG).
Roger Sperberg
firstinitial lastname at gmail
Hello,
(sorry, I write a bigger answer, I describe, what I did now, maybe I do some mistake in using XML CE, but the work looks difficult to me, I am used to use Oxygen till now)
well, I created with Roma new schema in xml syntax (myTEI.rng).
In the xml-file I deleted the association created in Oxygen (<?oxygen RNGSchema="myTEI.rnc" type="compact"?>) than tried to associate the new schema, and (in XML CE: XML > Associate > XML Schema) and my <TEI>-Element was changed to this form:
<TEI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:teix="http://www.tei-c.org/ns/Examples" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:noNamespaceSchemaLocation="/home/josef/www/plain_to_xml/BRUSSIG/BR_header/myTEI.rng">
I dont understand, why the program uses absolut path, when I save the file and send it to my colleague in the project, the validation will not work :-/ I dont want to say, that they would not recognize the problem, but the "problem" is, that they have to modify the <TEI>-Element and associate the schema again, because they use Oxygen.
and … than next step in Validating the file: XML > Validate > Relax NG - I selected the new .rng schema, but there is error message: "Error at line 2: Expecting a namespace for element TEI" …
so I added the namespace declaration xmlns="http://www.tei-c.org/ns/1.0" but the error message is now:
"Error at line 2: Invalid attribute noNamespaceSchemaLocation for element TEI"
well … I deleted the "noNamespaceSchemaLocation" with attribut and … the file is as valid recognised
it is quiet hard way to validate a file in comparison to oxygen :-(
my second try to validate is, without the association-tag and the <TEI> looks like this:
"<TEI xmlns="http://www.tei-c.org/ns/1.0">"
than F6 to validate with the selected relax NG (.rng) schema → it works
because I need to have two files opened and validate them, I opened the second file, I let all the tags as the oxygen crreated them (the assotioation tag to ".rnc" (!)) and than I pressed F6 - the document is valid (well, important is here not, if it is valid, but that the validation works)