Post has attachment

Hello to every one!!
This is my first post in this group so nice day to everybody and thanks a  lot!
I have a question:
I am making a .xqm with XBase for output a html web page (sorry if I say any dum I am beginner in Rest/RestFul and xml queries) well, I had assigned xml files so:
Here at pastebin http://pastebin.com/FvWUYpTu

(:Consulta por Artista:)
module namespace page = 'http://basex.org/modules/web-page';
(:~
 : Esta función pide un nombre
 :)
 
 declare
   %rest:path("/cds")
   %output:method("html")
   %output:doctype-system("about:legacy-compat")
   function page:starthtml()
   as element(html)
  {
     <html>
       <head>
         <title>Formulario de Artistas</title>
       </head>
       <body>
         <form action="/cds/consultar" method="POST">
         Nombre:<input type="text" name="nombre" />
         <input type="submit" value="Consultar" />
         </form>
       </body>
     </html>
  };
 
(:~
 : Esta funcion devuelve los datos consultados
 :)
 declare
   %rest:path("/cds/consultar")
   %rest:POST
   %rest:form-param("nombre","{$nombre}", "(Sin nombre)")
   %output:method("html")
   %output:doctype-system("about:legacy-compat")
   
   function page:consulta-nombre(
     $nombre as xs:string, $cd as xs:,$art,$can)
     as element(html)
     {
       <html>
         <head><title>Resultado</title></head>
         <body>
           for
            $art in doc("artistas.xml")/artistas/artista,
            $can in doc("canciones.xml")/canciones/cancion,
            $cd in doc("cds.xml")/cds/cd

where
$art/nombre = $nombre
and
$can/idArtista = $art/idArtista
and
$cd//idCancion = $can/idCancion

return <li>CD{data($cd/idCD)}, {data($cd/Titulo)} Artista: {data($art/nombre)}, {data($art/apellidos)} , idCancion: {data($can/idCancion)}, Canción: {data($can/nombreCancion)}.</li>

         </body>
       </html>
     };
I am getting this error:

Variable $cd is not assigned by the annotations.

Any one knows how can I fix it?

Thanks a lot!!

Hello all! I'm new to the group. I've got an interesting question. Unfortunately I'm not near my computer to share snippets of my xsl. So this is more theoretical than anything.

I created an xsl that grabs a specific root element attribute (value-of select="*/[@attribute]"). This returns the desired result. However, if I try to, say, return an attribute of a sub element, I get a blank result (..."//[@attribute]"). Thinking that maybe i'd missed a parent by mistake, I try to return a copy-of select= "/", I get a blank result. I've never run into this before. Just wondered if someone out there has had a similar experience. Thanks in advance!

Post has attachment
Accurate XML conversion services for entire business needs at affordable rates.

hello guys :) I need to edit some xml files - select data in tags that matches certain criteria, store the data in variables select parent and child tags, delete parent and child, create new tags.
 I use regex and some bash script and tools - grep, awk, sed, etc. This is not the best possible solution. 
I know some javascript, php and bash. What might be an easy and reliable solution that will help me do my work - python and some libs seem to be proposed as a reliable tool for this kind of work. 

<hello/>
Wait while more posts are being loaded