hydralix / docbkx-tools

Automatically exported from code.google.com/p/docbkx-tools
0 stars 0 forks source link

JSP-style <?eval ${project.version}?> entity replacement also for attributes #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In the attached example file, the following expression 

  <para>Testing: <?eval ${project.version}?></para>

compiles and generates the expected output, e.g. for a version of 1.2.3 you get

  Testing: 1.2.3

However, the following expression

  <para>Testing: <ulink url="http://<?eval ${project.version}?>"/></para>

fails with

Error on line 11 column 108 of file:///C:/Users/.../src/docbkx/entity
-test.xml:
  Error reported by XML parser: The value of attribute "url" associated
with an element type "ulink" must not contain th
e '<' character.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to transform entity-test.xml.

Embedded error: org.xml.sax.SAXParseException: The value of attribute "url"
associated with an element type "ulink" must
 not contain the '<' character.

It would be nice if the entity replacement could also be applied to
attributes, as in this example. This is especially relevant for e.g. links
to API documentation which will frequently contain references to project
names and versions.

Versions:

Plugin version: 2.0.9
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_17
Java home: C:\Program Files\Java\jdk1.6.0_17\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows vista" version: "6.0" arch: "amd64" Family: "windows"

Original issue reported on code.google.com by sharedo...@gmail.com on 25 Feb 2010 at 7:34

Attachments:

GoogleCodeExporter commented 8 years ago
See the comments for http://code.google.com/p/docbkx-tools/issues/detail?id=48 
for a
possible workaround.

Original comment by sharedo...@gmail.com on 26 Feb 2010 at 8:38

GoogleCodeExporter commented 8 years ago
Maybe there is a simple solution, relying on maven resource filtering. The $ 
sign in ${prop} now needs to be escaped with its equivalent numerical $

Original comment by MimilO...@gmail.com on 19 Aug 2010 at 10:11

Attachments: