Ghingis
February 9th, 2006, 03:22
I have an XML schema (RNG and XSD) that was generated from the various XML documents found in the FantasyGrounds folder.
How to generate:
(I'm new to XML so forgive me if I use the wrong terminology.)
Combine all XML documents into one source. Create a new XML document with a single <root></root> element. Then, for each XML document in the FantasyGrounds folder, copy all the text between <root> and </root> and place into the new document between <root> and </root>. The final document should have a single <root> element with all the text from the other XML documents in between.
Next find an XML schema generator that generates a schema for the XML editor that you are using. I am using an open source XML editor called PolloXML (https://pollo.sourceforge.net). PolloXML will except both RNG and W3C XSD schemas. I found a tool called EditiX (https://www.japisoft.com) which will generate these schemas. Open the XML source file into the tool and generate the desired schema.
NOTE: I did have to modify a few of the XML documents under the FantasyGrounds folder. Some of the XML documents contain @laquo (or something like that) that the XML Schema generator did not like. In order to get something the XML Schema generator would like I replaced @laquo with --.
This method creates a schema based on the source that is input into the generator. This schema may not actually match the exact schema that is being used by the developers of FantasyGrounds. However, it does create a schema based on how the structure is currently being used.
I dont mind sharing what I have, but I dont know a site where I can post the schemas that I have. Any recomendations? I'm looking for a free site that only requires a user name and a password. Or, if someone would like to post it for me, I could PM a ZIP of both schemas.
Ghingis
How to generate:
(I'm new to XML so forgive me if I use the wrong terminology.)
Combine all XML documents into one source. Create a new XML document with a single <root></root> element. Then, for each XML document in the FantasyGrounds folder, copy all the text between <root> and </root> and place into the new document between <root> and </root>. The final document should have a single <root> element with all the text from the other XML documents in between.
Next find an XML schema generator that generates a schema for the XML editor that you are using. I am using an open source XML editor called PolloXML (https://pollo.sourceforge.net). PolloXML will except both RNG and W3C XSD schemas. I found a tool called EditiX (https://www.japisoft.com) which will generate these schemas. Open the XML source file into the tool and generate the desired schema.
NOTE: I did have to modify a few of the XML documents under the FantasyGrounds folder. Some of the XML documents contain @laquo (or something like that) that the XML Schema generator did not like. In order to get something the XML Schema generator would like I replaced @laquo with --.
This method creates a schema based on the source that is input into the generator. This schema may not actually match the exact schema that is being used by the developers of FantasyGrounds. However, it does create a schema based on how the structure is currently being used.
I dont mind sharing what I have, but I dont know a site where I can post the schemas that I have. Any recomendations? I'm looking for a free site that only requires a user name and a password. Or, if someone would like to post it for me, I could PM a ZIP of both schemas.
Ghingis