[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Fwd: xmlns ignore

Sérgio Mariano Dias sergiomariano at gmail.com
Fri Sep 11 09:45:08 PDT 2009


  Fwd: xmlns ignore
Dear all,

I have a problem to ignore a xmls attribute in a tag and did not found
information how to ignore this attribute. Somebody can help me.


I'm using the saxon HE 9.2 to read a xml. My xml have a tag  with  "xmlns="
http://www. ..."", how ignore the "xmlns" when a read the file?

I needed to ignore this attribute because the address return “page no found”
and so my program return nothing. As test, I remove the address from the xml
and the program return the correct  value.


I'm reading the file using this code:

                 Processor proc = new Processor(false);
                 XQueryCompiler comp = proc.newXQueryCompiler();
                 XdmNode source =   proc.newDocumentBuilder().build(new
StreamSource(inputFile));


                 XQueryExecutable exp = comp.compile("/.../... ...");
                 XQueryEvaluator eval = exp.load();
                 eval.setContextItem(source);

                 XdmValue v = eval.evaluate();
                 System.out.println(v.size());


Regards and thank you very much by any help,




---------- Forwarded message ----------
From: Michael Kay <http://x-query.com/mailman/listinfo/talk>
Date: 2009/9/3
Subject: RE: xmlns ignore
To: http://x-query.com/mailman/listinfo/talk



Short answer: you can't.

This is actually a standard XQuery coding question, nothing specific to
Saxon, so I suggest that you ask it on http://x-query.com/mailman/listinfo/talk

Michael Kay
Saxonica

> -----Original Message-----
> From: http://x-query.com/mailman/listinfo/talk [mailto:http://x-query.com/mailman/listinfo/talk]
> Sent: 02 September 2009 16:04
> To: http://x-query.com/mailman/listinfo/talk
> Subject: xmlns ignore
>
> Dear Michael Kay
>
> I'm using the saxon HE 9.2 to read a xml. My xml have a tag
> with  "xmlns="http://www. ..."", how ignore the "xmlns" when
> a read the file?
>
> I'm reading the file using this code:
>
>                 Processor proc = new Processor(false);
>                 XQueryCompiler comp = proc.newXQueryCompiler();
>                 XdmNode source =
> proc.newDocumentBuilder().build(new StreamSource(inputFile));
>
>
>                 XQueryExecutable exp = comp.compile("/.../... ...");
>                 XQueryEvaluator eval = exp.load();
>                 eval.setContextItem(source);
>
>                 XdmValue v = eval.evaluate();
>                 System.out.println(v.size());
>
>
> Regards ,
>
>
>
>




-- 
Sérgio Mariano Dias
http://www.dcc.ufmg.br/~mariano <http://www.dcc.ufmg.br/%7Emariano>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090911/c744fc0d/attachment.htm


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.