Solved

XSL+XML in a include tag

Posted on 2002-05-24
3
363 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
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
b1xml2 earned 200 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

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…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

856 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