Hi All,
for a detected device I would like to use an appropriate xsl file.
To do this I have created a DeviceDisplayDetector object I have attempted to inject in
deviceDisplayTypes so that I can get at the associated xsl for the device that has made a request.
The configuration code within my applicationContext.xml is as follows:-
<bean id="deviceDetector" class="my.DeviceDisplayDetector">
<property name="deviceDisplayTypes"><ref bean="deviceDisplayTypes"/></property>
</bean>
<!-- Setup PC specific attributes -->
<util:map id="deviceDisplayTypes" map-class="java.util.HashMap">
<property name="PC"><ref bean="pcDeviceAttrib"/></property>
<property name="MOBILE"><ref bean="mobileDeviceAttrib"/></property>
</util:map>
<util:map id="pcDeviceAttrib" map-class="java.util.HashMap">
<entry key="my.vo.FootBallImageVO" value="PC_FootBallImageVO.xsl"/>
<entry key="my.ce.TennisImageVO" value="PC_TennisImageVO.xsl"/>
</util:map>
<util:map id="mobileDeviceAttrib" map-class="java.util.HashMap">
<entry key="my.vo.FootBallImageVO" value="MOBILE_FootBallImageVO.xsl"/>
<entry key="my.ce.TennisImageVO" value="MOBILE_TennisImageVO.xsl"/>
</util:map>
I keep getting the following error:-
applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException:
<Line 96, Column 12>: XML-20148: (Error) Invalid element 'util:map' in content of 'beans', expected elements '[import, alias, bean]'.
Any ideas
Mat