Click here to Skip to main content
15,911,646 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionEscaping quotes in XML Pin
richiemac29-Aug-06 5:26
richiemac29-Aug-06 5:26 
AnswerRe: Escaping quotes in XML Pin
led mike29-Aug-06 6:18
led mike29-Aug-06 6:18 
GeneralRe: Escaping quotes in XML Pin
richiemac29-Aug-06 7:08
richiemac29-Aug-06 7:08 
GeneralRe: Escaping quotes in XML Pin
led mike29-Aug-06 7:28
led mike29-Aug-06 7:28 
GeneralRe: Escaping quotes in XML Pin
richiemac29-Aug-06 22:46
richiemac29-Aug-06 22:46 
GeneralRe: Escaping quotes in XML Pin
led mike30-Aug-06 5:01
led mike30-Aug-06 5:01 
GeneralRe: Escaping quotes in XML Pin
richiemac30-Aug-06 21:35
richiemac30-Aug-06 21:35 
Questionxsl simple question Pin
Brent Lamborn28-Aug-06 9:46
Brent Lamborn28-Aug-06 9:46 
I'm new to xsl. Here is a snippet of my xml:


<?xml version="1.0" standalone="yes"?>
<DocumentElement>
<Picture PhotoID="2259" Owner="Brent" Title="Test Picture" Url="http://www.mysite.com/1.jpg" " />
</DocumentElement>


And here is my xsl:


<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match="/">
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Pictures</title>
<link>http://www.mysite.com/</link>
<description>Pictures</description>
<managingEditor>brent@mysite.com</managingEditor>
<language>en-us</language>
<xsl:for-each select='DocumentElement/Picture'>
<item>
<guid isPermaLink="false">
<xsl:value-of select='PhotoID'/>
</guid>
<title>
<xsl:value-of select='Title'/>
</title>
</item>
</xsl:for-each>
</channel>
</rss>
</xsl:template>
</xsl:stylesheet>


Note: they might not match up exactly since I changed it to hide secure data.

Anyway, my question is, how do I get to the values in each of my Picture elements? Doing this:


<xsl:value-of select='PhotoID'/>


does not work. I think it would if my xml looked like:

<pre>
<Picture>
<PhotoID>1234</PhotoID>
</Picture>
</pre>

How do I change my xsl to get the PhotoID, given the xml format above?





"Half this game is ninety percent mental." - Yogi Berra

If you can read thank a teacher, if you can read in English, thank a Marine.

M y and h don't work so well due to m addiction to caffeine and m in abilit to to set a cup down uprigt.


AnswerRe: xsl simple question Pin
Brent Lamborn28-Aug-06 10:04
Brent Lamborn28-Aug-06 10:04 
AnswerRe: xsl simple question Pin
Elina Blank28-Aug-06 10:06
sitebuilderElina Blank28-Aug-06 10:06 
GeneralRe: xsl simple question Pin
Brent Lamborn28-Aug-06 10:07
Brent Lamborn28-Aug-06 10:07 
QuestionMultiple root elements [modified] Pin
Tomi8728-Aug-06 9:21
Tomi8728-Aug-06 9:21 
AnswerRe: Multiple root elements Pin
led mike29-Aug-06 6:19
led mike29-Aug-06 6:19 
GeneralRe: Multiple root elements Pin
Tomi8729-Aug-06 6:40
Tomi8729-Aug-06 6:40 
GeneralRe: Multiple root elements Pin
led mike29-Aug-06 7:35
led mike29-Aug-06 7:35 
Questionxml-excel Pin
fmardani25-Aug-06 3:32
fmardani25-Aug-06 3:32 
QuestionSorting nodes by a child node Pin
Malcolm Smart25-Aug-06 1:05
Malcolm Smart25-Aug-06 1:05 
QuestionHow do i control the format of a date output by XSL? Pin
Red_Wizard_Shot_The_Food24-Aug-06 0:48
Red_Wizard_Shot_The_Food24-Aug-06 0:48 
AnswerRe: How do i control the format of a date output by XSL? Pin
Dustin Metzgar24-Aug-06 4:20
Dustin Metzgar24-Aug-06 4:20 
Questionexport to excel using xslt when the column name contains blank?? [modified] Pin
steven_wong23-Aug-06 16:51
steven_wong23-Aug-06 16:51 
Questionremove periculat node from xml file Pin
rkhokle22-Aug-06 20:57
rkhokle22-Aug-06 20:57 
AnswerRe: remove periculat node from xml file Pin
Christian Graus22-Aug-06 21:07
protectorChristian Graus22-Aug-06 21:07 
QuestionSaving svg or xml to client side Pin
Yeast2722-Aug-06 7:31
Yeast2722-Aug-06 7:31 
Questionxml Pin
rkhokale19-Aug-06 3:04
rkhokale19-Aug-06 3:04 
AnswerRe: xml Pin
Vitaliy Tsvayer20-Aug-06 9:09
Vitaliy Tsvayer20-Aug-06 9:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.