Solved

XSL+XML in a include tag

Posted on 2002-05-24
3
366 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 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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 learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

707 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