<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel">
    <title>gmane.lisp.lib.cxml.devel</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/81"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/80"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/79"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/78"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/77"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/76"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/75"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/74"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/73"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/72"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/71"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/70"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/69"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/68"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/67"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/66"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/65"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/64"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/63"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/62"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/81">
    <title>Patch for ASDF 3</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/81</link>
    <description>&lt;pre&gt;The way you look for the path of catalog.dtd doesn't work in ASDF 3.
Here is a supported way that works with all versions of ASDF 2 and later.

I'll try to improve backward compatibility, but you may nonetheless
want to apply the patch.
Also, I believe that three years afterwards, and
with each and every implementation providing ASDF 2,
it is safe to remove the #-asdf2 code around your codebase.

—♯ƒ • François-René ÐVB Rideau •Reflection&amp;amp;Cybernethics• http://fare.tunes.org
Work harder! Millions on welfare depend on you.
&lt;/pre&gt;</description>
    <dc:creator>Faré</dc:creator>
    <dc:date>2013-01-29T18:01:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/80">
    <title>Possible bug in rune-dom::adjust-vector-exponentially</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/80</link>
    <description>&lt;pre&gt;Hi,

I have a process that is stuck in the following function:

;; from dom-impl.lisp
(defun adjust-vector-exponentially (vector new-dimension set-fill-pointer-p)
  (let ((d (array-dimension vector 0)))
    (when (&amp;lt; d new-dimension)
      (loop
  do (setf d (* 2 d))
  while (&amp;lt; d new-dimension))
      (adjust-array vector d))
    (when set-fill-pointer-p
      (setf (fill-pointer vector) new-dimension))))


Apparently, adjust-vector-exponentially assumes d &amp;gt; 0, but this function has been called from (METHOD SAX:CHARACTERS (RUNE-DOM::DOM-BUILDER T)) with an empty string (d = 0).  The loop obviously shows it will never exit the function.

Adding the following before the loop statement fixes the problem:

      (when (= d 0)
        (incf d))


Best Regards,
Camille



&lt;/pre&gt;</description>
    <dc:creator>Camille Troillard</dc:creator>
    <dc:date>2012-12-05T15:46:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/79">
    <title>Incorrect character with code 12 in output?</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/79</link>
    <description>&lt;pre&gt;Hello,

I have a database with text data which sometimes is not proper to valid XML.
For example, there is a field sometimes containing the character new-page or ^L in emacs (ASCII code = 12).

While CXML does not complain and outputs cmxl:text as it was given, another XML parser complains that this is not valid XML.

PCDATA invalid Char value 12

I am expecting CXML to produce valid output, is there something I missed to make it more strict?

I am using LispWorks 64 bits.


Thanks!

Best Regards,
Cam



&lt;/pre&gt;</description>
    <dc:creator>Camille Troillard</dc:creator>
    <dc:date>2012-12-05T16:11:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/78">
    <title>Klacks bug with &amp;# entities on CCL</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/78</link>
    <description>&lt;pre&gt;Hi there,

The following code breaks in CCL (Version 1.8-r15286M  (DarwinX8632))
with the most recent cxml from quicklisp (cxml-20110619-git):

(klacks:with-open-source (source (cxml:make-source "&amp;lt;value&amp;gt;&amp;amp;#32;987lkjasd&amp;lt;/value&amp;gt;"))
  (klacks:consume source)
  (klacks:consume source)
  (klacks:consume source))

Here's the SLIME backtrace I get from evaluating that form:

  0: ((SETF RUNES:%RUNE) #\  "" 0)
  1: (CXML::READ-TOKEN-3 #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL :TOKEN-SEMANTIC NIL :INPUT-STACK ...))
  2: (CXML::PEEK-TOKEN #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL :TOKEN-SEMANTIC NIL :INPUT-STACK ...))
  3: (CXML::KLACKS/CONTENT #&amp;lt;CXML::CXML-SOURCE #xD7DE306&amp;gt; #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL :TOKEN-SEMANTIC NIL :INPUT-STACK ...) #&amp;lt;CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL ..))
  4: (CXML::KLACKS/ELEMENT-2 #&amp;lt;CXML::CXML-SOURCE #xD7DE306&amp;gt; #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL :TOKEN-SEMANTIC NIL :INPUT-STACK ...) (("") ("xmlns" . "http://www.w3.org/2000/xmlns/") ..) #&amp;lt;CCL:COMPILED-L..
  5: (CXML::FILL-SOURCE #&amp;lt;CXML&lt;/pre&gt;</description>
    <dc:creator>Andreas Fuchs</dc:creator>
    <dc:date>2012-09-10T00:33:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/77">
    <title>Bug in DTD parsing?</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/77</link>
    <description>&lt;pre&gt;(flex:with-input-from-sequence (s (babel:string-to-octets
                                   "&amp;lt;![IGNORE[ ]]&amp;gt;&amp;lt;!-- --&amp;gt;"
                                   :encoding :utf-8))
  (cxml:parse-dtd-stream s))

errors with
Document not well-formed: Unexpected character #\!.
Context:
  Line 1, column 17 in NIL

   [Condition of type CXML:WELL-FORMEDNESS-VIOLATION]

but parses OK with whitespace between ]]&amp;gt; and &amp;lt;!--

(for a real example, see line 396 in http://docbook.org/xml/4.3/dbpoolx.mod)

it looks like P/IGNORE-SECT in cxml/xml/xml-parse.lisp should unread 1
rune after matching ]]&amp;gt; (or exit the loop sooner so it doesn't read an
extra).


&lt;/pre&gt;</description>
    <dc:creator>Bart Botta</dc:creator>
    <dc:date>2012-08-28T22:58:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/76">
    <title>Re: validating XML: document</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/76</link>
    <description>&lt;pre&gt;Hello David,

Thank you for your message. Indeed, your tip worked and correctly
omitted the warnings. As I said before, with some help and good
description about the possible root cause of the bug, I would be glad
to help you fix the bug in CXML code.

Best,

Alexandre Rademaker
http://arademaker.github.com/

On Wed, Jul 11, 2012 at 11:33 AM, David Lichteblau &amp;lt;david&amp;lt; at &amp;gt;lichteblau.com&amp;gt; wrote:


&lt;/pre&gt;</description>
    <dc:creator>Alexandre Rademaker</dc:creator>
    <dc:date>2012-07-12T12:22:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/75">
    <title>Re: validating XML: document</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/75</link>
    <description>&lt;pre&gt;Hi,

Quoting Alexandre Rademaker (arademaker&amp;lt; at &amp;gt;gmail.com):

sorry for the late response.  The warnings are a cxml bug I haven't
fixed yet (sorry about that, too :-)).  Until then, my recommendation is
to use the following workaround:

(handler-bind ((warning #'muffle-warning))
  ...)

around the call to map-document to suppress the warnings and any related
performance issues.


Best regards
d.


&lt;/pre&gt;</description>
    <dc:creator>David Lichteblau</dc:creator>
    <dc:date>2012-07-11T14:33:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/74">
    <title>Re: validating XML: document</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/74</link>
    <description>&lt;pre&gt;Hello All,

Four months ago I posted the following message. Does anyone have any
idea if the warnings was my mistake or a possible bug in the code of
CXML? In the second case, with some directions I would be glad to help
to fix the problem.

Best,
Alexandre

On Wed, Mar 14, 2012 at 10:06 PM, Alexandre Rademaker
&amp;lt;arademaker&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:


&lt;/pre&gt;</description>
    <dc:creator>Alexandre Rademaker</dc:creator>
    <dc:date>2012-07-10T02:41:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/73">
    <title>Inconsistency in creating %children vector</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/73</link>
    <description>&lt;pre&gt;I was scratching my head for a couple of hours today, because of an apparent failure of cxml-dom::make-space - it did not increase the size of the %children vector. On closer examination, it turned out that the reason was that the %children vector was not adjustable, at that point.

The only places in cxml-stp where %children is set up are in %unchecked-insert-child (parent-node.lisp) and normalize-text-nodes! in xpath.lisp. The first of these has (make-array ... :adjustable t ...), while the other does not. My guess is that normalize-text-nodes! might be called as part of an xpath evaluation, and if this happens in code that is actually building the cxml-stp structure, the result might be a situation where the %children vector is not adjustable.

I'm not sure if this is a valid use of cxml-stp/xpath, but there is at least one documented case where it has been done :-)

I could (trivially) change my code to not use xpath as part of the construction process, but adding :adjustable t to the call to make-array &lt;/pre&gt;</description>
    <dc:creator>Raymond Wiker</dc:creator>
    <dc:date>2012-07-09T18:39:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/72">
    <title>Re: Real-world example: with attachment</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/72</link>
    <description>&lt;pre&gt;Hi Ray,

Thanks. It does seems easier with xpath. Perhaps it's my stubbornness that keeps me hammering away at cxml-stp. If no one comes up with a good example for STP, I think I'll take the path of least resistance and do as you suggest.

Cheers,
- Steve


________________________________
 From: Raymond Wiker &amp;lt;rwiker&amp;lt; at &amp;gt;gmail.com&amp;gt;
To: Steven Nunez &amp;lt;steve_nunez&amp;lt; at &amp;gt;yahoo.com&amp;gt; 
Cc: "cxml-devel&amp;lt; at &amp;gt;common-lisp.net" &amp;lt;cxml-devel&amp;lt; at &amp;gt;common-lisp.net&amp;gt; 
Sent: Monday, June 11, 2012 5:14 PM
Subject: Re: [cxml-devel] Real-world example: with attachment
 

On Jun 11, 2012, at 05:50 , Steven Nunez wrote:
(defun algorithm-name (model)

I'd do something like the following:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun algorithm-name (model)
  (xpath:with-namespaces ((nil "http://www.dmg.org/PMML-4_0"))
    (xpath:string-value (xpath:evaluate "//RegressionModel/&amp;lt; at &amp;gt;algorithmName" model))))

(defun model-coefficient-list (model)
  (xpath:with-namespaces ((nil "http://www.dmg.org/PMML-4_0"))
    (let ((regression-model-node (xpath:first-node (&lt;/pre&gt;</description>
    <dc:creator>Steven Nunez</dc:creator>
    <dc:date>2012-06-11T08:04:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/71">
    <title>Re: Real-world example: with attachment</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/71</link>
    <description>&lt;pre&gt;
I'd do something like the following:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun algorithm-name (model)
  (xpath:with-namespaces ((nil "http://www.dmg.org/PMML-4_0"))
    (xpath:string-value (xpath:evaluate "//RegressionModel/&amp;lt; at &amp;gt;algorithmName" model))))

(defun model-coefficient-list (model)
  (xpath:with-namespaces ((nil "http://www.dmg.org/PMML-4_0"))
    (let ((regression-model-node (xpath:first-node (xpath:evaluate "//RegressionModel" model)))
          (*read-eval* nil))
      `(,(xpath:string-value (xpath:evaluate "&amp;lt; at &amp;gt;modelName" regression-model-node))
        ,&amp;lt; at &amp;gt;(xpath:map-node-set-&amp;gt;list
           (lambda (node)
             (list
              (xpath:string-value (xpath:evaluate "&amp;lt; at &amp;gt;name" node))
              ;; note: xpath:number-value may work here, depending on
              ;; your implementation... does not work with Lispworks
              ;; 6.1 under Mac OS X
              (read-from-string (xpath:string-value (xpath:evaluate "&amp;lt; at &amp;gt;coefficient" node)))))
           (xpath:evaluate "RegressionTable/NumericP&lt;/pre&gt;</description>
    <dc:creator>Raymond Wiker</dc:creator>
    <dc:date>2012-06-11T07:14:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/70">
    <title>Real-world example: with attachment</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/70</link>
    <description>&lt;pre&gt;Greetings again,

Perhaps a good example would be a real one. I'm starting with some simple functions, such as obtaining the model name, algorithm, etc, from the attached XML example. Can anyone provide an exemplary method for doing this? Below is my naive attempt, which are all failing miserably:

(defun algorithm-name (model)
  "Returns the algorithm for the model"
  (stp:filter-recursively (stp:of-name "algorithmName" (stp:namespace-uri model)) model))

I know this one will (if it were working) return a list, but since I can't get past the namespace problem haven't bothered to go any further. That function, I assume, is a rather trivial one for someone with some good examples or knowledge to work from. Here's a slightly more difficult function:

(defun model-coefficient-list (model)
  "Returns a nested list of the following structure: (&amp;lt;model-name&amp;gt;-coefficients (coefficient1 coefficient1-value) (coefficient1 coefficient2-value) ... (coefficientn coefficientn-value))"
  ...)

Something like this would&lt;/pre&gt;</description>
    <dc:creator>Steven Nunez</dc:creator>
    <dc:date>2012-06-11T03:50:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/69">
    <title>Real-world Example</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/69</link>
    <description>&lt;pre&gt;Greetings again,

Perhaps a good example would be a real one. I'm starting with some simple functions, such as obtaining the model name, algorithm, etc, from the attached XML example. Can anyone provide an exemplary method for doing this? Below is my naive attempt, which are all failing miserably:

(defun algorithm-name (model)
  "Returns the algorithm for the model"
  (stp:filter-recursively (stp:of-name "algorithmName" (stp:namespace-uri model)) model))

I know this one will (if it were working) return a list, but since I can't get past the namespace problem haven't bothered to go any further. That function, I assume, is a rather trivial one for someone with some good examples or knowledge to work from. Here's a slightly more difficult function:

(defun model-coefficient-list (model)
  "Returns a nested list of the following structure: (&amp;lt;model-name&amp;gt;-coefficients (coefficient1 coefficient1-value) (coefficient1 coefficient2-value) ... (coefficientn coefficientn-value))"
  ...)

Something like this would &lt;/pre&gt;</description>
    <dc:creator>Steven Nunez</dc:creator>
    <dc:date>2012-06-11T02:46:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/68">
    <title>namespace-uri usage</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/68</link>
    <description>&lt;pre&gt;Gents,

Can anyone tell me why namespace-uri can't give me the namespace for this test file?

&amp;lt;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"&amp;gt;
  &amp;lt;Header copyright="Steve Nunez" description="Sample for Namespace"&amp;gt;
    &amp;lt;Timestamp&amp;gt;2012-06-11T08:17:10.8&amp;lt;/Timestamp&amp;gt;
  &amp;lt;/Header&amp;gt;
&amp;lt;/PMML&amp;gt;

* (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 simp&lt;/pre&gt;</description>
    <dc:creator>Steven Nunez</dc:creator>
    <dc:date>2012-06-11T02:27:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/67">
    <title>Re: cxml-stp usage</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/67</link>
    <description>&lt;pre&gt;
One easy way might be to use xuriella-xpath, which has xpath:with-namespaces - not sure if this is possible in your case.&lt;/pre&gt;</description>
    <dc:creator>Raymond Wiker</dc:creator>
    <dc:date>2012-06-10T17:42:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/66">
    <title>Re: cxml-stp usage</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/66</link>
    <description>&lt;pre&gt;Hi David,

Right, your explanation makes it clear. What's the convention/best practice/idiom for picking out the namespaces? Would be a bit repetitious to keep typing that out.

Regards,
- Steve



________________________________
 From: David Lichteblau &amp;lt;david&amp;lt; at &amp;gt;lichteblau.com&amp;gt;
To: "cxml-devel&amp;lt; at &amp;gt;common-lisp.net" &amp;lt;cxml-devel&amp;lt; at &amp;gt;common-lisp.net&amp;gt; 
Sent: Sunday, June 10, 2012 8:49 PM
Subject: Re: [cxml-devel] cxml-stp usage
 
Hi,

Quoting Steven Nunez (steve_nunez&amp;lt; at &amp;gt;yahoo.com):

The call to OF-NAME is the problem, it needs to be
  (stp:of-name "RegressionModel" "http://www.dmg.org/PMML-4_0")
because:


your element is in the http://www.dmg.org/PMML-4_0 namespace, whereas you
specified the empty namespace.

Roughly speaking,
  local-name == SYMBOL-NAME
  namespace-uri == SYMBOL-PACKAGE

I.e. just like distinct symbols in different packages have got nothing
to do with each other just because they happen to have the same
SYMBOL-NAME in Lisp, similarly in XML, two elements with the same
local-name but a different namespa&lt;/pre&gt;</description>
    <dc:creator>Steven Nunez</dc:creator>
    <dc:date>2012-06-10T11:06:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/65">
    <title>Re: cxml-stp usage</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/65</link>
    <description>&lt;pre&gt;Hi,

Quoting Steven Nunez (steve_nunez&amp;lt; at &amp;gt;yahoo.com):

The call to OF-NAME is the problem, it needs to be
  (stp:of-name "RegressionModel" "http://www.dmg.org/PMML-4_0")
because:


your element is in the http://www.dmg.org/PMML-4_0 namespace, whereas you
specified the empty namespace.

Roughly speaking,
  local-name == SYMBOL-NAME
  namespace-uri == SYMBOL-PACKAGE

I.e. just like distinct symbols in different packages have got nothing
to do with each other just because they happen to have the same
SYMBOL-NAME in Lisp, similarly in XML, two elements with the same
local-name but a different namespace are considered distinct.

[...]

An element with that local-name, right?


I think STP was pretty much finished when it was first written, because
it is basically a Common Lisp adaptation of XOM, so the design was clear
from the start.


I see no reason why you would have to call stp:first-child.  The example
works without that call.


d.


&lt;/pre&gt;</description>
    <dc:creator>David Lichteblau</dc:creator>
    <dc:date>2012-06-10T10:49:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/64">
    <title>cxml-stp usage</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/64</link>
    <description>&lt;pre&gt;Greetings all,

I'm a bit stumped by some of the STP functions and usage. The documentation is, well, a bit sparse, so it's not clear whether there really is a bug or I'm mis-interpreting what I'm reading. Here is a simple function that should return all the child nodes of an element with the local-name of 'RegressionModel':

(defun function-name (document)
  "Return the PMML model type of the document"
  (stp:filter-recursively (stp:of-name "RegressionModel") (stp:first-child document)))

According to the documentation of filter-recursively:
Return a list of descendant nodes of node in pre-order, from which nodes that do not satisfy predicate have been removed.and that for of-name:
This function creates a test function for nodes of this name.
and here's the local snippet of the xmls that I'm trying to filter for:

#.(CXML-STP:ELEMENT

Is stp stable enough for production use? It's been a while since it's been updated. I'm new to XML with LISP, so if there's a better documented or easier way to process &lt;/pre&gt;</description>
    <dc:creator>Steven Nunez</dc:creator>
    <dc:date>2012-06-10T07:51:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/63">
    <title>Exported symbols [was: Re: Possible bug in cxml-stp]</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/63</link>
    <description>&lt;pre&gt;

[Subject: changed, as it was getting embarassingly inappropriate.]

I ended up modifying my add-element function, based on the code that you
included earlier. It now looks like this:

(defun add-element (parent element-name attributes &amp;amp;optional element-value)
  (let ((element-name (if (listp element-name) (first element-name)
element-name))
        (namespace-uri (if (listp element-name) (second element-name)
                          (cxml-stp:find-namespace (cxml::split-qname
element-name) parent))))
    (let ((new-element (cxml-stp:make-element element-name namespace-uri)))
      (cxml-stp:append-child parent new-element)
      (loop for (name value) on attributes by #'cddr
            do (cxml-stp:add-attribute
                new-element
                (cxml-stp:make-attribute
                 (princ-to-string value)
                 name
                 (cxml-stp-impl::find-attribute-namespace
                  (cxml::split-qname name) new-element))))
      (when element-value
        (cxml-stp:app&lt;/pre&gt;</description>
    <dc:creator>Raymond Wiker</dc:creator>
    <dc:date>2012-05-25T10:28:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/62">
    <title>Any Clever Ways to Build an XForm from an XSD?</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/62</link>
    <description>&lt;pre&gt;Greetings all,

Having been away from the XML world for a while, I'm back on a fairly large project using it. While travelling down one of the paths in the rabbit warren, I came across a need to generate a from (probably an XForm) from an XSD. The use case is the specification of data models via the XSD, and quickly generating a form that a human user could use to input data.

It seems that there's *almost* some pipeline of chtml/cxml/cxml-stp that would get us most of the way there, but I haven't found a magic incantation that will do the trick.

Does anyone know of any clever way to go from an XSD to a X/HTML form? It doesn't have to look pretty, just be functional. I do know there will be some things that can't be easily done; that's fine, I expect manual work to reach the final product. I'm just looking for a tool that will get us most of the way there, since we have a large number of input formats. Doesn't have to even be a LISP solution, though that would be much preferred.

Cheers,
    - Steve&lt;/pre&gt;</description>
    <dc:creator>Steven Nunez</dc:creator>
    <dc:date>2012-05-23T07:40:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/61">
    <title>Re: Possible bug in cxml-stp</title>
    <link>http://permalink.gmane.org/gmane.lisp.lib.cxml.devel/61</link>
    <description>&lt;pre&gt;Quoting Raymond Wiker (rwiker&amp;lt; at &amp;gt;gmail.com):

Possibly...  cxml currently has such a macro only for its serialization
API, i.e.

CL-USER&amp;gt; (cxml:with-xml-output (stp:make-builder)
           (cxml:with-namespace ("a" "http://a")
             (cxml:with-element "a:b"
               (cxml:text "xyz"))))
#.(CXML-STP-IMPL::DOCUMENT
   :CHILDREN '(#.(CXML-STP:ELEMENT
                  #| :PARENT of type DOCUMENT |#
                  :CHILDREN '(#.(CXML-STP:TEXT
                                 #| :PARENT of type ELEMENT |#
                                 :DATA
                                 "xyz"))
                  :LOCAL-NAME "b"
                  :NAMESPACE-PREFIX "a"
                  :NAMESPACE-URI "http://a")))

That API can't really modify STP in place though; the builder only knows
how to set up a full document.


d.


&lt;/pre&gt;</description>
    <dc:creator>David Lichteblau</dc:creator>
    <dc:date>2012-05-22T22:02:04</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.lisp.lib.cxml.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.lisp.lib.cxml.devel</link>
  </textinput>
</rdf:RDF>
