GlastoEarth
(1)
XPath
(1)
Xselerator
(1)
Longitude
(1)
Sablotron
(1)
Latitude
(1)
Commons
(1)
Flickr
(1)

Google Earth Namespace problem

Asked By Dave F.
25-Jan-10 09:23 AM
Hi

I am a newbie & not really understanding the concept of namespaces.

In the code below xmlns:gx="http://www.google.com/kml/ext/2.2" prevents
the transformation by the XSL code shown further down.

I have tried duplicating it in the XSL file, giving it the same format eg
xmlns:xsl & other permutations but with no luck.
If I remove it it works.

it is downloaded from the 'net so i do not want to edit it manually.
Is there way to get it to accept this namespace? If not a way to remove
it using the XSL?



xmlns:gx="http://www.google.com/kml/ext/2.2"
xmlns:kml="http://www.opengis.net/kml/2.2"
xmlns:atom="http://www.w3.org/2005/Atom">

src='http://farm3.static.flickr.com/2427/3701739112_4bf013f673.jpg'><P><I>Photo
by nualabugeye, Flickr</I><P>
Welcome to GlastoEarth. The most comprehensive interactive guide to the
world's largest open air arts festival.
Any comments, corrections or suggestions, please do get in touch:
admin@glastoearth.com.
http://www.glastoearth.com
We hope you enjoy this just a fraction of how much you enjoy the
festival itself.
authored by GlastoEarth and is ? 2008-2010</I>
members are used under the Creative Commons license attributed by their
authors at the time of inclusion.</I>



xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>






Thanks
Dave F.

Dave F.

Martin Honnen replied to Dave F.
25-Jan-10 11:35 AM
Please state exactly what happens when you say "prevents the
transformation". Do you get an error? Which one exactly, by which tool?
What output do you expect, what output do you get?




--

Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/

Martin Honnen wrote:No Error. The output is identical to the input XML.

Dave F. replied to Martin Honnen
25-Jan-10 01:36 PM
No Error. The output is identical to the input XML.

I am expecting it return the document in XML format but with this line
missing: <name>The Map!</name>.

If I remove xmlns="http://www.opengis.net/kml/2.2" it works as expected.

I have just started using Xselerator to edit/run, but I am not happy with
it  -the editor appears to have some quirks.

Could you recommend an editor/compiler, preferably free. Sablotron was
suggested as a command line transformer, but cannot find a download. is
it still in existence?

Thanks for your help
Dave F.

Dave F.

Martin Honnen replied to Dave F.
26-Jan-10 06:37 AM
That makes much more sense then your earlier statement that xmlns:gx
makes problems.

As for dealing with the default namespace, with XSLT 1.0 you need to
bind a prefix to the namespace URI and use that prefix in XPath
expressions and match patterns to qualify element names e.g.

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:kml="http://www.opengis.net/kml/2.2"
version="1.0">


...


--

Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/
???????????? "Dave F." <df@zx.cu.uk> ???? ??????????
23-Apr-10 09:39 AM
???????????? "Dave F." <df@zx.cu.uk> ???? ??????????
Post Question To EggHeadCafe