![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - newbie xslt namespace question >Thread Next - Re: newbie xslt namespace question Re: newbie xslt namespace questionTo: NULL Date: 1/3/2005 6:47:00 PM Hi, > the problem i have now is that the element ogr:geometryProperty is not > matched by the template. The problem seems to be the ogr-prefix (which > is the default namespace in the gml-file). Apparently, 'http://gdal.velocet.ca/ogr' is the default namespace in the gml-file. The 'ogr' prefix declares a non-default namespace (viz. 'http://ogr.maptools.org/') Therefore the 'cat' element and the 'ogr:geometryProperty' element can never be matched (in Xpath) with one single namespace (prefix). You'll have to define yet another prefix in the XSLT that links to 'http://ogr.maptools.org/' in order to match the 'geometryProperty' elment with a prefix. e.g. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gml="http://www.opengis.net/gml" xmlns:ogr="http://gdal.velocet.ca/ogr" xmlns:OGR='http://ogr.maptools.org/' xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:template match="ogr:defol"> test2 <xsl:apply-templates select="OGR:geometryProperty"/> <xsl:apply-templates select="ogr:site_id"/> <xsl:apply-templates select="ogr:cat"/> </xsl:template> <xsl:template match="OGR:geometryProperty"> test3 <xsl:apply-templates select="gml:Polygon"/> </xsl:template> </xsl:stylesheet> regards, -- Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041) Spread the wiki (http://www.wikipedia.org) | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
