Solved

XSL+XML in a include tag

Posted on 2002-05-24
3
359 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
Comment Utility
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
Comment Utility
<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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now