The background for this is that I am working with solar search results. Results are coming back in XML I'm using XSL conversion to display results.
& lt; Table & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; Name & lt; / Th & gt; & Lt; Th & gt; Age & lt; / Th & gt; & Lt; Th & gt; Latitude & lt; / Th & gt; & Lt; Th & gt; Longitude & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Xsl: each selection = "feedback / result / doctor" & gt; & Lt; Xsl: Select Sort = "str [@ name = 'name']" /> & Lt; Xsl: Select sort = "int [@ name = 'age']" /> & Lt; Xsl: Select Sort = "??? [@ name = 'lat']" / & gt; & Lt; Xsl: Select Sort = "??? [@ name = 'lng']" /> & Lt; Tbody & gt; & Lt; TR & gt; & Lt; Td> & Lt; Xsl: Select value = "str [@ name = 'name']" /> gt; & Lt; / Td> & Lt; Td> & Lt; Xsl: Select value = "int [@ name = 'age']" /> gt; & Lt; / Td> & Lt; Td> & Lt; Xsl: Select value = "??? [[name = 'latitude]]" /> & Lt; / Td> & Lt; Td> & Lt; Xsl: Select value = "??? [[name = 'lng']" /> gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / XSL: for-each & gt; & Lt; / Table & gt; I basically indexed each field as a string. Once I changed it and indexed the number as integer, which was not displayed in the output. I fully guess and go with the int because I index them as integers and it works. ;)
Here are the data types that I list latitude and longitude in Solar:
& lt; Field name = "lat" type = "latLongDouble" indexed = "true" stored = "true" /> & lt; Field name = "lng" type = "latLongDouble" indexed = "true" stored = "true" /> I do not know of any appropriate XSL datatype which is "???" Can be used for
- Can you provide me a list for them?
- Can you provide alternative xsl method to display me the output?
Many thanks!
PÃ © rz
Good! It took some time but I thought it.
& lt; Doc & gt; & Lt; Int name = "age" & gt; 14 & lt; / Int> & Lt; Str name = "name" & gt; Joan Doe & lt; / Str & gt; & Lt; Double name = "latitude" & gt; 45.17614 & lt; / Double & gt; & Lt; Double name = "lng" & gt; -93.87341 & lt; / Double & gt; & Lt; / Doc & gt; View data type for each XML with your XML and select "???" Use in place of
In my example, I will do this:
& lt; Td> & Lt; Xsl: Select the value = "double [[name = 'latitude]]" /> & Lt; / TD & gt; & Lt; Td> & Lt; Xsl: Select Value = "Double [[@Name = 'LNG']" /> gt; & Lt; / Td> Hope that helps someone in the future!
PÃ © rz
Comments
Post a Comment