Yes, you could do some kind of regex preprocess; you can't feed named
entities to an XML parser without providing a DTD, sadly. But that
probably isn't any easier than adding the DTD -- both require updating
every file. Another possibility is writing some custom code that does
the modification inline while streaming the docs into DIH, but I don't
know enough about DIH to know how easy/hard that would be ..
-Mike
On 2/4/15 2:37 AM, Raul wrote:
How would you do the transform of the content to convert the entities?
With a pre-proccess? We have lot of xml with the content insert (and
the content has the entities) and will be dificult add the DTD to the
content...
Thanks
- Raul
El 03/02/15 a las 17:15, Michael Sokolov escribió:
If the entities are in the content, you would need to add the DTD to
the content, not to the stylesheet. Or you could transform the
content converting the entities.
-Mike
On 02/03/2015 10:41 AM, Raul wrote:
Hi all!
I'm trying to use Solr with the DIH and xslt processing. All is fine
till i put xml with html entity in the content (like $euro;) where i
get a
Caused by: javax.xml.transform.TransformerException:
com.sun.org.apache.xml.internal.utils.WrappedRuntimeException
i put in the xsl the dtd declaration of the entity but i don't get
lucky:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE stylesheet [
<!ENTITY laquo "«">
<!ENTITY raquo "»">
<!ENTITY hellip "…">
<!ENTITY euro "€">
]>
<xsl:stylesheet version='1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
....
Do you know how i can proccess??
Thanks in advance