On Thu, Oct 06, 2005 at 10:18:43AM +0200, Hussein Shafie wrote:
> We, here at XMLmind, as extensive users of XXE, daily copy and paste
> plain text from XHTML to DocBook and vice-versa. Here's how we do it:
[...]
> Simply select the text across elements and directly paste it
> where you want by clicking on the middle button/scroll wheel.
Text copied this way is run together into a single line. I can
understand why this would happen, particularly if you first delete
insignificant white space and then extract the text nodes. I am looking
for functionality that is aware of a document's content model (if one
exists) and can add line breaks (i.e. very simple "formatting") to the
text based upon that content model. I believe this is similar to what
XXE does when it serializes documents using the indent feature.
> Moreover on Linux (that is, Generic Unix/X-Window), it also works
> between XXE and the other applications, which makes this feature even
> more attractive.
Ah, at first I thought this worked across platforms. My users would
like to be able to copy text from XXE to other applications on a variety
of platforms.
> Remember that you can do anything you want by writing a custom command
> in Java[tm]. Writing a custom command is not very hard (forget about
> XSLT and use XXE DOM), less hard than many things you have already done.
Thanks for the reminder. I often try very hard to get as much done as
possible with the XXE configuration syntax, and forget that writing
custom commands is a tool at my disposal.
XXE understands the content model of XML documents for which it has a
configuration. In particular, it knows when elements may (or may not)
have text node children, based upon the DTD provided in the document or
configuration. (Does this also apply with other schemata types such as
WXS or RNG?) Is there a way to access this information in the XXE DOM?
Take care,
John L. Clark
P.S. I don't know if I've mentioned it already, but I am very grateful
for the XPath search utility that has recently been included in XXE.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20051006/af2aed78/attachment.sig