473,412 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

highlight_string() for XSL in php

I'm writing a tutorial, and would like to have highlighted snippets of
PHP and XSL code, displayed in context-colored HTML.

PHP has the highlight_string() method for displaying strings as
context-colored PHP code, but I don't know of any way to generate
context-colored XML/XSL from PHP strings. Does anyone know of a good
library or code snippet that generates context-colored XSL for display
in HTML?

Thanks.
Jun 2 '08 #1
1 1547
*** Daniel Talsky escribió/wrote (Thu, 17 Apr 2008 11:38:30 -0700 (PDT)):
PHP has the highlight_string() method for displaying strings as
context-colored PHP code, but I don't know of any way to generate
context-colored XML/XSL from PHP strings. Does anyone know of a good
library or code snippet that generates context-colored XSL for display
in HTML?
I use GeSHi for such task:

http://qbnz.com/highlighter/
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor en cubitos: http://www.demogracia.com
--
Jun 2 '08 #2

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

Similar topics

5
by: Tim Tyler | last post by:
Are there any syntax colouring scripts out there? Ones where you provide the script with the path or URL of some source file - and they return a web page containing correctly-coloured source...
3
by: Sims | last post by:
Hi, I have an eval(...) and sometimes, (not often), i get an error. I can catch the error quite easily, if( FALSE === eval($code )) { // output the code echo ( htmlentities($code ); }
8
by: Tim Tyler | last post by:
I'm getting fatal errors when executing code - and my error handler is failing to trap them - so I get no stack backtrace :-( The error I am getting is: "Fatal error: Call to a member function...
3
by: Brian \bojo\ Jones | last post by:
Is it possible to make IIS6 render .phps files as php-source? I haven't been able to locate any information on this, and am beginning to believe it's not possible. -- Brian 'bojo' Jones
6
by: Alvaro G. Vicario | last post by:
Before writing it myself (str_replace, preg_replace and a keyword list updated as I find them?) I'd like to know whether there's already a simple syntax highlighting class or script I can use to...
1
by: Barti | last post by:
How show php code like <?function()?> in more user-friendly way? Is it possible at all? I am thinking about something simillar to dreamweaver icon Bart
6
by: comp.lang.php | last post by:
Original thread in http://www.phpbuilder.com/board/showthread.php?p=10659321#post10659321 I have CRON scripts with owner/group relationship of "phillip/apache" that need to access directories...
3
by: harvey | last post by:
How do I get a text string that may contain HTML tags to echo out to a web browser verbatim? IE I want the tags to be printed out - not interpreted. Thanks
7
realin
by: realin | last post by:
hi guys, I want to know how to highlight my PHP code inside a BBCODE like tag .. generally i am representing my code between the tags and it is actually code and not code1 in the , i have just...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.