472,353 Members | 1,364 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

output of "<" and ">" in stylesheet

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

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
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...
1
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document...
4
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)...
0
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...
4
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...
3
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> ...
3
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>...
36
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...
1
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. ...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

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.