I am working with a XML driven CMS, and before I run off and either write or implement a module that parses the iCal format, I was wondering if there was any way to parse it using just XSLT or ideally just an XPath expression, as this is a built in function of the CMS.
Share
Well, your initial problem would be that it’s not an XML format. iCalendar files are tagged text:
So, parsing that with XPath and XSLT could be challenging. However, there is an XML representation of iCalendar. You can find information about in the xCal Basic spec. The example above (from that spec) looks like:
(I copied from the draft, hence the odd namespace). There’s more information on the OASIS Coverpages site and on the CalConnect blog (that’s the most up to date).
If you can convert from one to the other, then yes, you could parse it using XPath statements. If not, then you can parse the text. I’m not actually aware of any implementations I’m afraid.