logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: rendering PCDATA in xml documents: msg#00007

emacs.nxml.general

Subject: Re: rendering PCDATA in xml documents

On Mon, 2004-02-23 at 17:08, Eric Chastan wrote:
> Hello All,
>
> Josh, I don't understand why you said that it's not the job of an xml
> editor to handle PCDATA. I think that it is important for such tool to
> render all text with a friendly layout because a lot of xml files a
> quiet obscure to read and a good layout helps a lot.
> It is true that in my mail I spoke only about "code" but it in fact it
> could be every kind of text.
> I think that nxlm is really better than psgml and with the ability to
> render the full text in a pretty way it could be even better.

If you've got an XML file containing JavaScript, it seems like a very
reasonable to want to be able to use the facilities of javascript mode
to edit the embedded JavaScript, and similarly for other kinds of PCDATA
which have a specialized mode.

> You spoke about mmm-mode did you really try it? mmm-mode is a good
> tool but it has a lot of drawbacks, one of them is that mmm-mode used
> overlays intensively and this leads to problem when there is are a lot
> of embedded sections.

I haven't yet tried mmm-mode.

I can see a couple of problems with making a general purpose mode work
for XML:

a) I want to be able to specify which mode is used for PCDATA at the XML
level rather than in terms of regexes in the buffer. For example, I want
to be able to specify that the content of an element with a specific
namespace URI and local name should use a particular mode.

b) I don't want to be forced to use CDATA sections. I want Emacs to
understand that the JavaScript code isn't simply a substring of the XML
buffer, but rather a substring of the buffer after substitution of
character/entity references. This seems not so easy. Perhaps you could
have a separate, temporary buffer for each PCDATA fragment, which would
use the appropriate mode for that fragment. You would arrange you could
edit either the XML or the temporary buffer and the temporary buffer
would always be equal to the result of replacing character/entity
references in the corresponding fragment of XML. Then you would have a
command in XML mode to switch to the temporary buffer, and I guess a
minor mode in the temporary buffer to maintain synchronization with the
XML and to provide a command to switch back to the XML. Does mmm-mode
deal with the escaping issue?

What kind of UI would people like to see for dealing with embedded
PCDATA which has its own Emacs major mode?

James
--
To send me mail, replace auth-only by public in the from address.



------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/2U_rlB/TM
--------------------------------------------------------------------~->


Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/emacs-nxml-mode/

<*> To unsubscribe from this group, send an email to:
emacs-nxml-mode-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/








Only community members can participate in forum threads. You must Register or log in to contribute.

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo