Can anyone tell me why namespace-uri can't give me the namespace for this test file?
<PMML version="4.0" xsi:schemaLocation="http://www.dmg.org/PMML-4_0 http://www.dmg.org/v4-0/pmml-4-0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.dmg.org/PMML-4_0">
<Header copyright="Steve Nunez" description="Sample for Namespace">
<Timestamp>2012-06-11T08:17:10.8</Timestamp>
</Header>
</PMML>
* (defparameter *ns-test*
(cxml:parse #p"ns-test.xml" (stp:make-builder)))
* (stp:namespace-uri *ns-test*)
This, and a few variations, give "There
is no applicable method for the generic function".
I suspect the answer is because I'm asking for the namespace of a document, whereas STP wants it for an element. That's fine, but different enough from the typical ways of XML processing to make figuring out how to use it rather difficult.
Does anyone have any working examples of processing documents typically found 'in the wild'? I've read the test.lisp file, but it simply programatically creates elements and then tests for them. Some real-world examples, common idioms and best practices would be very helpful.
Cheers,
- SteveN