Solved

XSL+XML in a include tag

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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Parsing the XML data to SQL Server 4 65
Scraping specific data within an XML document 19 56
Problem to Popup 2 81
Windows Tool to Build Android and iOS App 3 76
Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

770 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