473,498 Members | 703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

output of "<" and ">" in stylesheet

Does anyone have an idea, how to do it? Thanks in advance!
Jul 20 '05 #1
7 2070

Assuming you mean an xslt stylesheet (rather than css or some other
system) it's XML so for < you can use &gt; and for > you can use either
&gt; or >

David
Jul 20 '05 #2
David Carlisle <da****@nag.co.uk> wrote in message news:<yg*************@penguin.nag.co.uk>...
Assuming you mean an xslt stylesheet (rather than css or some other
system) it's XML so for < you can use &gt; and for > you can use either
&gt; or >

David


Hallo, David,

I am writing an xsl stylesheet. It seems that $lt; and $gt; don't work.
Jul 20 '05 #3
zh*******@hotmail.com (Diandian Zhang) writes:
David Carlisle <da****@nag.co.uk> wrote in message news:<yg*************@penguin.nag.co.uk>...
Assuming you mean an xslt stylesheet (rather than css or some other
system) it's XML so for < you can use &gt; and for > you can use either
&gt; or >

David


Hallo, David,

I am writing an xsl stylesheet. It seems that $lt; and $gt; don't work.


You are allowed to give us some clues:

Do you mean:

The system generates an error (if so, what error message)
or
the system generates the wrong output (if so, what output did you get
and what output did you want).

The way to specify a < in XML is to to use &gt;. Of course it will also
be output that way as well in the html or xml output methods.

If you mean you want a literal < in the ouput then perhaps you are not
generating XML and so should use xsl:output method="text"

David
Jul 20 '05 #4

someone wrote:
The way to specify a < in XML is to to use &gt;.

^^^^
&lt;

Jul 20 '05 #5
David Carlisle <da****@nag.co.uk> wrote in message news:<yg*************@penguin.nag.co.uk>...
someone wrote:
The way to specify a < in XML is to to use &gt;. ^^^^
&lt;


Hallo, David,

thank you for your reply. What I want to generate from a XML file, is
a text file as the following:
<'
some things
more things
...'


And my stylesheet looks like this:
<xsl:stylesheet ...>
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:text>&lt;'</xsl:text>
...
</xsl:template>
</xsl:stylesheet>

The output is &lt;' instead of <'. Have I done anything wrong here?
Jul 20 '05 #6
The output is &lt;' instead of <'. Have I done anything wrong here?


Your stylesheet is fine but your system is clearly using XML not text
serialisation so is ignoring your xsl:output.

Usually this only happens if you output from XSLT to a DOM or other
kind of in memory structure rather than to a file and then get the final
output from the DOM (which doesn't know anything about xsl:output hints)

so it probably depends on what system you are using and how you are
calling it.

David
Jul 20 '05 #7
Diandian Zhang (zh*******@hotmail.com) wrote:

: thank you for your reply. What I want to generate from a XML file, is
: a text file as the following:
: <'
: some things
: more things
: ...
: >'

: And my stylesheet looks like this:
: <xsl:stylesheet ...>
: <xsl:output method="text"/>
: <xsl:template match="/">
: <xsl:text>&lt;'</xsl:text>

did you try

<xsl:text disable-output-escaping='yes'>

: ...
: </xsl:template>
: </xsl:stylesheet>

: The output is &lt;' instead of <'. Have I done anything wrong here?

--

This space not for rent.
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3193
by: Ray Tayek | last post by:
hi, trying to use an xslt to make an xslt. trying something like: <?xml version="1.0" encoding="UTF-8"?> <?xmlspysamplexml H:\java\projects\spy1\spy\inputDocumentMap.xml?> <xsl:stylesheet...
1
6794
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
4
1996
by: | last post by:
Hello NG! Within a xsl-stylesheet I have an element <xsl:text><!]></xsl:text> If I use that stylesheet to transform some xml-data (to html) with .... pOut = New System.IO.StringWriter
0
1715
by: Emil Christopher Melar | last post by:
I wanted to use App_Theme, because then I might have some automation when it comes to not hard coding paths for the css. And as you know, you know that mozilla and IE renders differently, and...
4
9145
by: Jon | last post by:
Hi, I used XslCompiledTransform with the following Xsl file. The <xsl:text disable-output-escaping="yes"does not work when using XslCompiledTransform to do the trnasform (namely the output...
3
18967
by: jariwaladivyesh | last post by:
Hi frnds, i have simple XML doc <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <data> <name> Divyesh Jariala</name> </data>
3
7801
by: joe | last post by:
Is it OK to have multiple: <script type="text/javascript" src="funcs1.js"></script> <script type="text/javascript" src="funcs2.js"></script> <script type="text/javascript"...
36
5051
by: Roedy Green | last post by:
The only browser I have encountered that supports <colgroup><col class="behold"></colgroup> to apply a CSS style to a whole column, is Microsoft Internet Explorer. I have been told it SHOULD NOT...
1
4294
by: ismailc | last post by:
Hi, I need help please. Update system to to new version & moved on to .Net2 But now my code that worked in my .Net1 xslt does not work. .Net1 fine: <xsl:stylesheet...
0
7163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5460
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4904
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.