![]() Note also that if there are spaces in the directory name (and possibly long directory names) that the address may not be read properly by the XML software. So unless you’ve used the suggested directory naming proposed above you’ll need to modify the above script to use the local computer address you used. Note that the last line in the declaration contains the “local address” on your computer and one of the Schema files you downloaded from. Needs to be replaced with the following: For ONIX files using Reference Tags: You just have to be sure to replace it with the correct ONIX Message declaration before you send the file to your trading partners.īut one way or another, everything from the first line (for reference tag files) or (for short tag files), such as in this example: Or alternatively, you can copy and paste a declaration from below into your ONIX file. And then copy and paste the ONIX file in using everything from the tag (Reference) or (Short) to the bottom of the ONIX file (including the or tag). Create a file, say: “schema.xml,” with either the Reference or Short tag declarations as below. While you can modify your ONIX file with a new declaration, what I find easier is to create a file just for schema validation and then to copy the ONIX data section into it. In order to schema validate using XML Notepad (and other XML software) you’ll need to replace that declaration with another one. The ONIX file you send to your trading partners has to have the “declaration” -the first lines before the Header tags -as defined by the ONIX for Books XML Message Specification. The last hurdle is creating a schema specific file with your ONIX in it. New code lists are announced and listed by BookNet but if you add a new code to your ONIX and your file fails your validation process an outdated XSDs file might be the problem. ![]() The schema file ONIX_BookProduct_CodeLists.xsd includes the ONIX codes, so every time the code list is updated, this file needs to be updated as well. However you choose to name the location put the 7 files into that location. As an example, if you were to create a directory in your top level C drive named XML with a subdirectory XSD and put the contents of the zip there, then naming the local file reference would not only be easy but have a long tradition behind it: You’ll need to put a location reference to these files into your schema, so make it easy on yourself and store this on your computer in an easily named location -avoid spaces in your directory names (spaces can confuse the XML software’s ability to find the file). Unpacking the zip will give you a directory with 7 files in it, 6 xsd ‘schema’ files and a ‘read me’. Click on the “Release 2.1 (revision XX) XML Schema” and save the zip to your hard drive.Scroll down to “Download Release 2.1 XML Schema” and click on it.Navigate through Standards to ONIX for Books, Previous releases (not ONIX 3.0).You’ll need is the ONIX Schema on your computer, which is available from The software requires that you have.NET Frameworks v2.0 or above installed (you’ll likely have it already on your computer, but it’s another Microsoft product) and you can download XML Notepad here: ![]() Just be sure to use the correct ONIX declaration on the file you send to trading partners. That just means replacing the first few lines of the ONIX file with a different script -a simple cut and paste that only takes a few seconds. The only problem is that you’ll need to use a file with its XML declaration information set up for a schema validation rather than using the normal ONIX declaration. It’s free and written by a Microsoft programmer, Chris Lovett, so the freeware is from a safe source, it’s easy to set-up for a schema validation and robust with files as large as 20,000 records. For the purist, those who want their XML validation without the added benefits of what some programmer thinks would improve their ONIX file, there is a lovely generic XML software product called XML Notepad 2007.
0 Comments
Leave a Reply. |