Click here to Skip to main content
15,899,474 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: XSL value-of output problem! Pin
Frank Horn23-Aug-08 9:25
Frank Horn23-Aug-08 9:25 
GeneralRe: XSL value-of output problem! Pin
Saul Johnson23-Aug-08 11:51
Saul Johnson23-Aug-08 11:51 
Question[Message Deleted] Pin
debobrata21-Aug-08 1:27
debobrata21-Aug-08 1:27 
AnswerRepost Pin
led mike21-Aug-08 4:58
led mike21-Aug-08 4:58 
QuestionHow to get the attribute name from xml using xslt Pin
ThangamSundar20-Aug-08 23:43
ThangamSundar20-Aug-08 23:43 
AnswerRe: How to get the attribute name from xml using xslt Pin
led mike21-Aug-08 4:56
led mike21-Aug-08 4:56 
QuestionQualified XML Root, InvalidOperationException while deserializing Pin
abcxyz8220-Aug-08 9:49
abcxyz8220-Aug-08 9:49 
QuestionXSL Nesting Problem! Pin
Saul Johnson19-Aug-08 6:00
Saul Johnson19-Aug-08 6:00 
Hi All!

I need to emulate the HTML <B> and <EM> tags complete with all attributes and event handlers for a little project of mine and everything works fine when these elements are seperate, Here's my xsl stylesheet:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:template match="/HTML/BODY/EM">
		<EM ID="{@ID}" CLASS="{@CLASS}" TITLE="{@TITLE}" STYLE="{@STYLE}" DIR="{@DIR}" LANG="{@LANG}" ONCLICK="{@ONCLICK}" ONDBLCLICK="{@ONDBLCLICK}" ONMOUSEDOWN="{@ONMOUSEDOWN}" ONMOUSEUP="{@ONMOUSEUP}" ONMOUSEOVER="{@ONMOUSEOVER}" ONMOUSEMOVE="{@ONMOUSEMOVE}" ONMOUSEOUT="{@ONMOUSEOUT}" ONKEYPRESS="{@ONKEYPRESS}" ONKEYDOWN="{@ONKEYDOWN}" ONKEYUP="{@ONKEYUP}"><xsl:value-of select="self::EM"/></EM>
	</xsl:template>

<xsl:template match="/HTML/BODY/B">
		<B ONCLICK="{@ONCLICK}" ONDBLCLICK="{@ONDBLCLICK}" ONMOUSEDOWN="{@ONMOUSEDOWN}" ONMOUSEUP="{@ONMOUSEUP}" ONMOUSEOVER="{@ONMOUSEOVER}" ONMOUSEMOVE="{@ONMOUSEMOVE}" ONMOUSEOUT="{@ONMOUSEOUT}" ONKEYPRESS="{@ONKEYPRESS}" ONKEYDOWN="{@ONKEYDOWN}" ONKEYUP="{@ONKEYUP}" ID="{@ID}" CLASS="{@CLASS}" TITLE="{@TITLE}" STYLE="{@STYLE}" DIR="{@DIR}" LANG="{@LANG}" ><xsl:value-of select="self::B"/></B>
	</xsl:template>

</xsl:stylesheet>


Now this works fine when <B> and <EM> are seperate, however when one tag is inside the other the result is no formatting at all!

The problem is that the match attribute of each xsl:template tag is only neing applied to B and EM tags in the BODY, is there any way I can apply the B and EM templates to the BODY and to all infinetly deeper nesting levels?

Thanks!

MrWolfy Big Grin | :-D
AnswerRe: XSL Nesting Problem! Pin
led mike19-Aug-08 11:11
led mike19-Aug-08 11:11 
AnswerRe: XSL Nesting Problem! Pin
Frank Horn19-Aug-08 21:16
Frank Horn19-Aug-08 21:16 
GeneralRe: XSL Nesting Problem! Pin
Saul Johnson20-Aug-08 3:25
Saul Johnson20-Aug-08 3:25 
GeneralRe: XSL Nesting Problem! Pin
Frank Horn20-Aug-08 8:05
Frank Horn20-Aug-08 8:05 
GeneralRe: XSL Nesting Problem! Pin
led mike20-Aug-08 8:32
led mike20-Aug-08 8:32 
QuestionHow to Create an XML Editor application tool in C#.NET Pin
debobrata18-Aug-08 23:56
debobrata18-Aug-08 23:56 
AnswerRe: How to Create an XML Editor application tool in C#.NET Pin
tptshepo19-Aug-08 3:27
tptshepo19-Aug-08 3:27 
GeneralRe: How to Create an XML Editor application tool in C#.NET Pin
debobrata19-Aug-08 4:46
debobrata19-Aug-08 4:46 
AnswerRe: How to Create an XML Editor application tool in C#.NET Pin
tptshepo19-Aug-08 9:12
tptshepo19-Aug-08 9:12 
AnswerRe: How to Create an XML Editor application tool in C#.NET Pin
blackjack215019-Aug-08 20:21
blackjack215019-Aug-08 20:21 
GeneralRe: How to Create an XML Editor application tool in C#.NET Pin
debobrata20-Aug-08 0:27
debobrata20-Aug-08 0:27 
QuestionMore than one xsd for a xml validation Pin
vicky0000017-Aug-08 20:36
vicky0000017-Aug-08 20:36 
QuestionHow to generate XML File from table Pin
Abdullah S. Abdelhay17-Aug-08 11:14
Abdullah S. Abdelhay17-Aug-08 11:14 
AnswerRe: How to generate XML File from table Pin
tptshepo19-Aug-08 20:50
tptshepo19-Aug-08 20:50 
Questionxsl not formating xml file correctly into csv file Pin
CodingLover15-Aug-08 16:54
CodingLover15-Aug-08 16:54 
QuestionThe 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' element is not declared Pin
That's Aragon14-Aug-08 0:57
That's Aragon14-Aug-08 0:57 
QuestionHow to define the font types in xsl output. Pin
CodingLover14-Aug-08 0:06
CodingLover14-Aug-08 0:06 

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.