|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
XSL & namespaces question
I want to transform an xml document that has a schema definition with an xsl sheet , for example the document could be :
<?xml version="1.0" > <?xml-stylesheet type="text/xml" href="my_style.xls"> <family xmlns="http://www.serviceobjects.com/"> .... <grandma> </grandma> .. <papa> </papa> </family> on my xsl I define the namespace at the top like : <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://www.serviceobjects.com/"> and I access the elements from the xml document naming the schema per each of them , like: <xsl:template match="d:family"> </xsl:template> But how do i use the expresions that allow me to access all child nodes for a parent node if I have a schema definition ? I mean, if i use : <xsl:apply templates select="d:.//"> to execute all templates of all child nodes of the current node, the code DOES not work at all. However , if i do not have a schema definition the xpath expression ' // ' works fine, that is the following piece of code : <xsl:template match="family"> <xsl:apply templates select=".//"> </xsl:template> will execute all the templates for the child nodes of the parent node family given that my xml document does not have a name space defined. Any ideas? any suggestions on where could I look this up ? Last edited by lola891 : February 5th, 2003 at 06:33 PM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XSL & schemas question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|