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:
  #1  
Old December 18th, 2003, 05:27 PM
Zylak's Avatar
Zylak Zylak is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Brasil
Posts: 3 Zylak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
question about XSL document() function and PHP

Hello,

I´m developing a website which uses PHp, Sablotron and mysql, with PHP creating xml files which will be parsed by Sablotron and then presented to the user.

Code excerpt:
Code:
<xsl:template match="//platform[@model='ps2']"
<xsl:for-each select="document('get_games:ps2')/games">
  <xsl:apply-templates />
</xsl:for-each>
</xsl:template>

<xsl:template match="//games">
<xsl:apply-templates select="game" />
</xsl:template>

<xsl:template match="game">
  <xsl:choose>
    <xsl:when test="../../@mode = 'ps2'">Playstation 2 game</xsl:when>
  </xsl:choose>
</xsl:template>


and finally my question is:
Inside a <xsl:for-each> when using a document(), being processed by PHP, how can i get a reference to an attribute/node which belongs to the "platform" node-set???

I´m not sure if this is the right forum to post this question, so i have posted here and in PHP forum.

Thanks in advance,

Reply With Quote
  #2  
Old January 9th, 2004, 11:34 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Well, one thing that comes to mind is to put the platform nodeset into a variable. There might be an easier way, but that should work.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > question about XSL document() function and PHP


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 2 hosted by Hostway
Stay green...Green IT