[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question: Namespace And XSL
- From: Martin Gudgin <firstname.lastname@example.org>
- To: Philippe LAMBERT <Philippe.LAMBERT@gemplus.com>, email@example.com
- Date: Wed, 09 May 2001 22:23:49 +0100
It's due to the way XPath works. In order to select namespace qualified
elements you must provide a binding between a prefix and a namespace name
and then used prefix:localname in the XPath expression. In XSLT you do it by
just providing a namespace declaration and then using the relevant prefix in
your select/match attribute values;
<xsl:template match='/' >
<xsl:value-of select='pre:Bap/@Version' />
----- Original Message -----
From: "Philippe LAMBERT" <Philippe.LAMBERT@gemplus.com>
Sent: Wednesday, May 09, 2001 9:11 PM
Subject: Question: Namespace And XSL
> A question:
> I have a XML with this root element:
> <Bap Version="1.0" xmlns="http://www.w3.org/namespace/">
> The namespace is written in the XML by castor's object, during
> When I try to apply to it a XSLT like this:
> <xsl:stylesheet version="1.0"
> <xsl:template match="/">
> <xsl:value-of select="Bap/@Version"/>
> it didn't work. The XSL seems unable to access the BAP. If I remove the
namespace declaration from the xml, it works, the version is found. Please
note the URI links to nothing, and the prefix is not explicit.
> Could someone explain to me why?
> What can I change in my XSLT to make it work without changing the XML?
> I think I didn't get something about namespace...
> Philippe Lambert
> Informaticien, Recherche et Développement
> Groupe AC&P
> * (514) 732-2388
> * firstname.lastname@example.org <mailto:email@example.com>
> >-----Original Message-----
> >From: Benjamin Franz [mailto:firstname.lastname@example.org]
> >Sent: Wednesday, May 09, 2001 12:13 PM
> >To: email@example.com
> >Subject: RE: NPR, Godel, Semantic Web
> >On Tue, 8 May 2001, Bullard, Claude L (Len) wrote:
> >Apologies if what you meant to say was "We cannot _currently_ model a
> >human's free will." - a statement with which I agree. The following is
> >aimed at what seems a categorical denial of the _possibility_
> >of modeling
> >'free will' (something that occurs frequently in literature
> >that wishes to
> >deny the possibility of ever achieving 'true' AI by attempting to
> >distinguish via questionale assertions that there is some
> >mystical 'free
> >will' that somehow flouts the rules of the universe and has no rules of
> >it's own). If that is not what was meant, disregard the rest
> >of my mail.
> >> We can only create stereotypical
> >> human models, not model humans. Why? We can't
> >> model a human's free will. Much about human behavior, say
> >> emotions, remains a black box. Yes, we can
> >> create a axioms for emotional relationships, and even
> >> simulate dynamism through event routing, but really
> >> we are just simulating, or building golems.
> >There is no evidence that 'free will' cannot be perfectly
> >modeled. It may
> >in fact be nothing more than an illusion caused by the impossibility of
> >modeling our *own* behavior perfectly (the machine cannot
> >simulate itself
> >perfectly because you fall into the infinite regression of
> >modelling the
> >model modelling the model modelling the model.....and hence the machine
> >cannot predict its own actions.). A *second* machine may well
> >be able to
> >model the first completely (but not itself as well).
> >The limitation is very probably in our current understanding
> >of the human
> >machine (and so our ability to build a precise model of it), not in a
> >categorical 'this cannot be modeled' limitation.
> >A fascinating article just hit the news re the discovery that
> >the sense of
> >'self' seems to largely be controlled by a specific portion of
> >the brain.
> >Benjamin Franz
> >"Premature optimization is the root of all evil in programming."
> > ---C.A.R. Hoare
> >The xml-dev list is sponsored by XML.org, an initiative of OASIS
> >The list archives are at http://lists.xml.org/archives/xml-dev/
> >To unsubscribe from this elist send a message with the single word
> >"unsubscribe" in the body to: firstname.lastname@example.org
> The xml-dev list is sponsored by XML.org, an initiative of OASIS
> The list archives are at http://lists.xml.org/archives/xml-dev/
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: email@example.com