XML Validation:
David Bovill
david at architex.tv
Mon Jun 15 07:42:23 EDT 2009
Has anyone done XML validation using Rev with and XML Schema? The docs say
you can use a DTD, but mention nothing about using a schema...
I'm looking to validate XML within Rev. Looking at the docs, we can use:
> Use the revXMLValidateDTD function to validate an XML tree against a DTD.
>
> Parameters:
> The treeID is the number returned by the revCreateXMLTree or
> revCreateXMLTreeFromFile function when you created the XML tree.
>
> The DTDText is a Document Type Definition.
I need to get the DTD from the url referenced in the XML file - however the
XML file uses an XML-based alternative to DTD, ( XML Schema ):
- http://www.w3schools.com/Xml/xml_dtd.asp
The XML starts with something of the form:
<?xml version="1.0"?>
> <XX xmlns="http://www.example.com/test/ui/" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://www.example.com/test/ui/ ..\ExampleXML\Test.xsd">
AFAIK, it is still not possible to use Rev to extract these XML attributes
(they aall get put in "xmlns" - see bugzilla 231) Skipping over that issue,
I could extract
xsi:schemaLocation="http://www.example.com/test/ui/..\ExampleXML\Test.xsd"
with a script but then the url is a bit strange I'm
not sure how to get the text referenced. Any ideas?
More information about the use-livecode
mailing list