?
Solved

XSL+XML in a include tag

Posted on 2002-05-24
3
Medium Priority
?
367 Views
Last Modified: 2013-11-18
Hello everybody!

I have a XSL transformation to SHTML file.

I want to obtain an include tag with a atributte file variable.

XML (I have):

<XML>
  <INC_URL>folder/name.htm</INC_URL>
</XML>

XSL (I need):

???? This is the cuestion

SHTML (I want):

<!-- #include file="folder/name.htm" -->


any idea?
0
Comment
Question by:ManoloMA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
b1xml2 earned 800 total points
ID: 7031563
ahhhh

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="//INC_URL">
<xsl:comment>#include file="<xsl:value-of select="." />"</xsl:comment>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
0
 
LVL 1

Expert Comment

by:RobinPatra
ID: 7031641
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
    <xsl:comment>
                   <xsl:text disable-output-escaping="yes">#include file="</xsl:text>
                   <xsl:value-of select="/XML/INC_URL"/>
                   <xsl:text disable-output-escaping="yes">"</xsl:text>
    </xsl:comment>
</xsl:template>
</xsl:stylesheet>
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7031751
The thing is there is no need to disable-output the " sign nor that of include file=" within a comment.

And of course aside from this, what Robin Patra has posted is similar in nature and thus does not conform to the EE  Guidelines.

What he should have done was after looking at my post decide that it was a duplicate and not post. Why? Because I directed him here seeing that he posted AFTER

"a do not post here, duplicate question, pls post at ..." was posted

0

Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question