xml - Parsing iCalendar data with XPath/XSLT -
i working xml driven cms, , before run off , either write or implement module parses ical format, wondering if there way parse using xslt or ideally xpath expression, built in function of cms.
well, initial problem it's not xml format. icalendar files tagged text:
begin:vcalendar version:2.0 prodid:-//hacksw/handcal//nonsgml v1.0//en begin:vevent dtstart:19970714t170000z dtend:19970715t035959z summary;language="en_us":bastille day party end:vevent end:vcalendar
so, parsing xpath , xslt challenging. however, there xml representation of icalendar. can find information in xcal basic spec. example above (from spec) looks like:
<?xml version="1.0" todo_namespace="foo"?> <icalendar xmlns:xcal="urn:ietf:params:xml:ns:xcal"> <vcalendar> <version>2.0</version> <prodid>-//hacksw/handcal//nonsgml v1.0//en</prodid> <vevent> <dtstart>19970714t170000z</dtstart> <dtendt>19970715t035959z</dtend> <summary xml:lang="en_us">bastille day party</summary> </vevent> </vcaledar> </icalendar
(i copied draft, hence odd namespace). there's more information on oasis coverpages site , on calconnect blog (that's date).
if can convert 1 other, yes, parse using xpath statements. if not, can parse text. i'm not aware of implementations i'm afraid.
Comments
Post a Comment