xsl-list
[Top] [All Lists]

[xsl] Help needed with converting to (patterned) Element content to sub-elements only

2009-01-23 13:35:43
Hi,
I would really appreciate advice on the following task. My present version uses python,
but I would like to use XSLT.

The input file includes <coordinate> elements of the form
<coordinate>
aaa,bbb,ccc
ddd,eee,fff  ggg,hhh    jjj,kkk,lll
</coordinate>

of which the content, when left and right stripped, is a
whitespace-separated sequence of points; each point
being a comma-separated sequence of either two or three numbers.

All <coordinate> elements are to be replaced, in the output file, by
elements of the form:

<FullCoordinates datum="WGS84" >
 <Point longitude="aaa" latitude="bbb" ht_above_geoid="ccc">
 <Point longitude="ddd" latitude="eee" ht_above_geoid="fff">
 <Point longitude="ggg" latitude="hhh">
 <Point longitude="jjj" latitude="kkk" ht_above_geoid="lll">
</FullCoordinates>

Please note there is no 'height-above-geoid' attribute in the third <Point>.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>