PCRE support for XSLT?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
AaronD Offline
Senior Member
Posts: 252
Joined: Jan 2007
Reputation: 0
Location: Dubai, United Arab Emirates
Post: #1
Does TinyXml used in XBMC support XSL transforms?

If so, would the dev's accept a patch to the scraper to support XSLT in a scraper?

I was thinking of another node like <REGEX/>, maybe <TRANSFORM/> that contains valid XSL for transforming XML API sources like TMDB or TVDB into valid XML for XBMC. This would even fit very nicely into the current input chain so it could be mixed with regex in the same scraper.

EDIT: I meant TinyXML rather than PCRE in title, but can't edit it.
(This post was last modified: 2010-05-05 15:45 by AaronD.)
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #2
It's certainly a nice idea - using regex on XML is a pain in the arse. Explore at will Smile

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #3
Looks like just using something like libxlst may be the easiest way to go. It pulls in libxml2, so we may wish to switch to using that rather than tinyxml.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
AaronD Offline
Senior Member
Posts: 252
Joined: Jan 2007
Reputation: 0
Location: Dubai, United Arab Emirates
Post: #4
Another option might be TinyXPath. It evaluates XPath queries on TinyXml classes. However I'm not clear from the documentation whether it allows full XSLT, or whether you'd need to roll your own transform by finding and replacing the XPath query yourself.

TinyXPath works in conjunction with TinyXml.
find quote