jackwanted123
New Member
I am trying to access a node inside an .xml file which uses namespaces and sort it. It is not working and I think that it has to do with the namespaces and not being able to qualify them properly.I have an index.xml which I use to combine the documents that I need and looks like this:\[code\]<?xml version="1.0" encoding="ISO-8859-1"?><?xml-stylesheet type="text/xsl" href="http://stackoverflow.com/questions/14510732/merge.xsl"?><pic:catalog xmlnsic = "pictureCatalog"> <pic:logo>Logo</pic:logo> <Author>User Name</Author> <pic:allPhotos>photos</pic:allPhotos></pic:catalog>\[/code\]the photos.xml looks like this:\[code\]<?xml version="1.0"?><pichotoCatalog xmlnsic="pictureCatalog"> <pichoto> <pic:title>Alcazar</pic:title> <pic:location>Segovia - Spain</pic:location> <pic:date>Jan 2013</pic:date> <pic:camera>Sony</pic:camera> <pic:resolution>12px</pic:resolution> <pic:format>.jpg</pic:format> <pic:description> Medieval Castle over the hill overlooking the city. </pic:description> </pichoto></pichotoCatalog>\[/code\]And my xsl stylesheet looks like this:\[code\] <!-- All the photos--> <xsl:template match = "pic:catalog/pic:allPhotos"> <html> <head> <link rel="stylesheet" type="text/css" href="http://stackoverflow.com/questions/14510732/Style.css" /> </head> <body> <xsl:for-each select="pichotoCatalog/pichoto"><br/> <xsl:sort select="pic:location"/> <xsl:value-of select="pichotoCatalog/pichoto/pic:location"/> </xsl:for-each> </body> </html> </xsl:template>\[/code\]Can anyone help?Bluetxxth