newtfire / textEncoding-Hub

shared repo for DIGIT 110: Text Encoding class at Penn State Erie, The Behrend College
https://newtfire.github.io/textEncoding-Hub/
Creative Commons Zero v1.0 Universal
17 stars 1 forks source link

Puzzling Schematron Validation Error #32

Closed am0eba-byte closed 3 years ago

am0eba-byte commented 3 years ago

When I associated my Schematron file to the coins_change.xml and looting_soldier.xml files (with mindful file management in mind of course) I got a strange error that I can't quite figure out how to fix: schematron_error

I tried re-associating and messing with the namespace lines quite a few times, but that error just keeps coming up on both of the xml files. Help?

ebeshero commented 3 years ago

@am0eba-byte Ah! I should have mentioned this in class. Schematron needs to know that what it is reading is actually a number to do those comparisons. It is actually interpreting the @lat and @long values as text instead of number information. (It's not recognizing that they are a numeric datatype, alas.) So, what you do is make sure it's being read as a number: wrap the the @lat and @long in your tests in a number() function, like so: number(@lat) so your comparison test will be testing a number.