XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old February 5th, 2003, 06:28 PM
lola891 lola891 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 10 lola891 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XSL & schemas question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway