Return-Path: X-Original-To: apmail-xalan-c-users-archive@www.apache.org Delivered-To: apmail-xalan-c-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3056F105B1 for ; Wed, 25 Sep 2013 19:40:20 +0000 (UTC) Received: (qmail 96155 invoked by uid 500); 25 Sep 2013 19:40:18 -0000 Delivered-To: apmail-xalan-c-users-archive@xalan.apache.org Received: (qmail 96142 invoked by uid 500); 25 Sep 2013 19:40:18 -0000 Mailing-List: contact c-users-help@xalan.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: c-users@xalan.apache.org Delivered-To: mailing list c-users@xalan.apache.org Received: (qmail 96134 invoked by uid 99); 25 Sep 2013 19:40:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Sep 2013 19:40:17 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [64.255.237.176] (HELO smtp4.pacifier.net) (64.255.237.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Sep 2013 19:40:12 +0000 Received: from webmail.iinet.com (web01-proaxis.pacifier.net [64.255.238.1]) by smtp4.pacifier.net (Postfix) with ESMTP id 3CEA538F40; Wed, 25 Sep 2013 12:39:52 -0700 (PDT) Received: from 159.121.180.80 (SquirrelMail authenticated user shathawa@e-z.net) by webmail.iinet.com with HTTP; Wed, 25 Sep 2013 12:39:52 -0700 (PDT) Message-ID: <28651.159.121.180.80.1380137992.squirrel@webmail.iinet.com> In-Reply-To: <1380137700017-40507.post@n7.nabble.com> References: <1380115744220-40498.post@n7.nabble.com> <28553.159.121.180.80.1380136614.squirrel@webmail.iinet.com> <1380137700017-40507.post@n7.nabble.com> Date: Wed, 25 Sep 2013 12:39:52 -0700 (PDT) Subject: Re: mapping a prefix to a namespace URI From: shathawa@e-z.net To: c-users@xalan.apache.org Cc: "afrenger" User-Agent: SquirrelMail/1.4.6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Checked: Checked by ClamAV on apache.org Aaron, In the case: xmlns="http://someweb.com" == you do have a namespace associated with the empty prefix. Steven J. Hathaway > Thank you very much for your reply Steven. > > My xml has xmlns="http://someweb.com" (i.e. no prefix which is what I've > always understood to be referred to as having default namespace). > > If you run a series of XML through the Xalan SimpleXPathAPI sample then, > if > you have no name space (no xmlns at all in the doc), you can use XPath > like > "/node1/node2/etc" and if you have a defined namespace, you can use XPath > like /myns:node1/myns:nod2e/myns:etc. But if you run a document with > "default namespace" through the SimpleXPathAPI sample, it returns no node > found. > > I've also found that when you interrogate a document like this in XMLQuire > it puts out "/dft:node1/dft:node2/dft:etc". > > I found a few post where folks had hit this same issue and were told to" > > "You'll also need to implement a PrefixResolver derivative and pass an > instance of that into the XPathEvaluator, so the XPath implementation can > map the namespace prefix to the proper namespace URI. You can look at the > existing PrefixResolver instances to see what's involved." -Dave Bertoni > > http://apache-xml-project.6118.n7.nabble.com/xpath-expression-with-namespace-td22110.html#a22111 > > > That post is rather old an maybe I'm heading in the wrong direction as > there > may be better ways to do this now. > > Thanks again for any help you can give me. > > Aaron > > > > -- > View this message in context: > http://apache-xml-project.6118.n7.nabble.com/mapping-a-prefix-to-a-namespace-URI-tp40498p40507.html > Sent from the Xalan - C - Users mailing list archive at Nabble.com. > >