Tuesday, 7 October 2014

Adding variables to data-config of Solr dataimport



I tried to add variable to data-config.xml for Solr dataimport but I have got the following error message when I tried to perform the dataimport:



Data Config problem: The prefix "xsl" for element "xsl:variable" is not bound.



The following data-config.xml I tried :



<?xml version="1.0" encoding="UTF-8"?>
<xsl:variable name="fileName" select="6781" />
<dataConfig>
<dataSource name="a" driver="net.ucanaccess.jdbc.UcanaccessDriver" type="JdbcDataSource" url="jdbc:ucanaccess://E:/feqh/Wak1/Wak1/main.mdb;memory=false"/>

<dataSource name="a1" driver="net.ucanaccess.jdbc.UcanaccessDriver" type="JdbcDataSource" url="jdbc:http://ucanaccessE:/feqh/Wak1/Wak1/${fileName}.mdb"/>

<document>
<entity name="Book" dataSource="a" query="select bkid AS id, bkid AS BookID,bk AS BookTitle, betaka AS BookInfo, cat as cat from 0bok WHERE bkid = ${fileName}">


I dynamically, using PHP script, to change the config file and I want a single place i.e variable to change its value and then it propagate to all places need it. Does it possible? Is there any mistakes in the xslt code I use?


No comments:

Post a Comment