473,385 Members | 1,640 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,385 software developers and data experts.

Adding a new type of PI or comment to the XML/XHTML DTD

Hi there. I'm writing code in eRuby (aka ERB) which is basically XHTML
+ ruby code contained inside <% these kind of %blocks. My editor
uses an XML parser which doesn't recognize these blocks and complains
about them. (oXygen/Xerces).

I spent a couple of hours looking at the DTDs to see how they
implement the existing processing instruction and comments blocks. But
I can't find it in there. The best I found was:

xhtml/dtd/xhtml1.dcl: PIC "?>"

Looks like it could mean "Processing Instruction Close"?

Anyway, is there even a way to modify the DTDs to allow the eRuby
block or would I have to edit the source code of Xerces?

--simon

PS I think that if eRuby had used <?ruby ?things would be a lot
easier .....
Feb 14 '08 #1
1 1850
sbwoodside wrote:
Hi there. I'm writing code in eRuby (aka ERB) which is basically XHTML
+ ruby code contained inside <% these kind of %blocks. My editor
uses an XML parser which doesn't recognize these blocks and complains
about them. (oXygen/Xerces).
That's correct. The <%%markup is simply not compatable with a normal
XML parser. It must be handled by a preprocessor of some kind, or by a
nonstandard parser specifically modified to handle it. You *may* be able
to process it using SGML tools rather than XML tools; I'm not sure about
that.
Anyway, is there even a way to modify the DTDs to allow the eRuby
block or would I have to edit the source code of Xerces?
No, there isn't. See above.
PS I think that if eRuby had used <?ruby ?things would be a lot
easier .....
Absolutely. Or, perhaps better, use real XML elements in a namespace
reserved for this scripting markup.

If you're working with an XML-based language such as XHTML, there really
is no excuse these days for introducing non-XML-compatable syntax. Note
that Java Server pages, which seems to be where the <%%syntax comes
from, eventually introduced an XML-compatable alternative. The eRuby
folks should be ***STRONGLY*** pressured to do likewise.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Feb 14 '08 #2

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

Similar topics

2
by: Richard | last post by:
Hi, I downloaded a sample form from formsplayer.com, extracted the source code and made some simple (I thought) mods. I added the comments before the html tag and the comments on the namespace...
9
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT...
1
by: The Eclectic Electric | last post by:
I'd be very grateful if anyone could help me with this. From my limited knowledge of Javascript I don't think it is possible, but I'll punt anyway. I downloaded and very slightly adapted this...
4
by: Rob Meade | last post by:
Hi all, I played with my first bit of AJAX the other week and was pleasantly surprised that I achieved my goal..now I'd like to try something else.. Question... If I have an updatePanel,...
11
by: karen987 | last post by:
I have a web page which used to work fine until i added a rich text editor. the pages are in ASP and it is a news weblog, with a comments section where people click the headline of a comment and...
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
2
by: jluo | last post by:
Hi all, Need some help here. I'm using these in a xsl: ~~~~~~~~~~~~~~~ <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0"...
2
by: Holger Jeromin | last post by:
Hello, i need to add SVG things direct in a Website. I know XHTML is best used for that, with works nice in Firefox and Opera. Internet Explorer is more challenging... I have ported my...
10
by: AC | last post by:
I had a page that does some event setup on window.onload: function prepEvents() { document.getElementById("menumap_sales").onmouseover = swapMenuSales; // etc } window.onload = prepEvents;
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.