Author Topic: BeerXML v2.07 XML files fail validation with XSD  (Read 639 times)

cmiller

  • Newbie
  • *
  • Posts: 9
  • BeerXML Rocks!
    • View Profile
BeerXML v2.07 XML files fail validation with XSD
« on: March 08, 2012, 10:40:17 AM »
Several of the included XML files fail validation with XMLReader. For example, the MedievalAle.xml recipe.

Element '{urn:beerxml:yeast:v2}amount', attribute 'volume': [facet 'enumeration'] The value 'mL' is not an element of the set {'ml', 'l', 'tsp', 'tbsp', 'ozfl', 'cup', 'pt', 'qt', 'gal', 'bbl', 'iozfl', 'ipt', 'iqt', 'igal', 'ibbl'}.

These also fail :
grain_ex_01.xml
grain_ex_02.xml
grain_ex_03.xml
hop_record_ex_01.xml
recipe_ex_01.xml

I'm guessing this may be because the XML files are all v2.06 and the schema is v2.07. It was actually kind f fortunate as it was obvious validation was working in my app ;-)

Chris

everlastg

  • Newbie
  • *
  • Posts: 3
  • BeerXML Rocks!
    • View Profile
Re: BeerXML v2.07 XML files fail validation with XSD
« Reply #1 on: April 05, 2012, 10:55:59 AM »
I read somewhere here that 2.05 is the last version where everything passes validation, but you can fix some of the validation errors in 2.07 easily:

These two have typos:
MedievalAle.xml
recipe_ex_01.xml
if you change any mL to ml and L to l it will pass validation, it is case sensitive.

This file appears just to be an empty template for having multiple hops in one file, it will pass if you add the requred hop info in from one of the other files
hop_record_ex_01.xml

These three are broke from the most recent ( relatively ) changes in the grain/fermentable schema which appear to need more work...
grain_ex_01.xml
grain_ex_02.xml
grain_ex_03.xml


cmiller

  • Newbie
  • *
  • Posts: 9
  • BeerXML Rocks!
    • View Profile
Re: BeerXML v2.07 XML files fail validation with XSD
« Reply #2 on: May 02, 2012, 01:43:39 AM »
Just an FYI, the BeerXML 2.0.1 document specifies these units of measure in a case sensitive format. This may very well be an XML document syntax issue, although one could argue these units of measure should be case insensitive.

Chris