[oXygen-user] Transforming without Entity placeholders
Oxygen XML Editor Support (Sorin Ristache)
Wed Nov 19 05:45:41 CST 2014
Hello Sascha,
Now I understand. You want to expand only the %entitiesxcom; reference
in the DOCTYPE declaration. I suggest a find and replace operation on
all DocBook chapter files using a regular expression that matches the
entity reference. Unfortunately you can't do it in only one action in
the Oxygen application because the replace part in the Find/Replace in
Files dialog box (Ctrl+Shift+H) is not multi-line enabled yet. But you
can do the replacement in one action per DocBook XML file, in the
Find/Replace dialog box (Ctrl+F or menu Find -> FInd/Replace), using the
following value in the "Find" area:
<!ENTITY % entitiesxcom SYSTEM "entitiesxcom.ent">(\s*?)%entitiesxcom;
and the following multi-line value in the "Replace with" area:
<!ENTITY company "Acme Widgets, Inc.">
<!ENTITY product "Top Widget">
You have to enable also the options "Regular expression" and "Dot
matches all" in the Find/Replace dialog box.
We will consider also adding multi-line support for the replace value in
the Find/Replace in Files dialog box (Ctrl+Shift+H).
Best regards,
Sorin
<oXygen/> XML Editor
http://www.oxygenxml.com
Sascha Manns wrote:
> In my present file i have anything like that:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
> "http://www.docbook.org/xml/4.5/docbookx.dtd" [
> <!ENTITY % entitiesxcom SYSTEM "entitiesxcom.ent">
> %entitiesxcom;
> ]>
> <chapter id="cha.mychapter" lang="de" xml:base="cha-mychapter.xml">
> <title>My Chapter</title>
> [...]
> </chapter>
>
> With using the copy.xsl it outputs:
> <?xml version="1.0" encoding="utf-8"?><chapter id="cha.mychapter"
> lang="de" xml:base="cha-mychapter.xml">
> <title>My Chapter</title>
> </chapter>
>
> My goal ist anything like that:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
> "http://www.docbook.org/xml/4.5/docbookx.dtd" [
> <!ENTITY company "Acme Widgets, Inc.">
> <!ENTITY product "Top Widget">
> ]>
> <chapter id="cha.mychapter" lang="de" xml:base="cha-mychapter.xml">
> <title>My Chapter</title>
> [...]
> </chapter>
>
> Do you know what i mean?
>
> Greetings Sascha
More information about the oXygen-user
mailing list