This module works great, but I am not familiar with creating xslt templates. I am trying to import XMLs from my old mediawiki site into drupal nodes. Has anyone here tried this? This seems like the right module for handling something like this, but maybe I am confused. Do you think if the xslt template is made correctly it could import and xml file from mediawiki?

Comments

weam’s picture

Category: task » support

The module uses PHP's XML support to transfrom the XML into HTML, with the XSLT script that you write. So yes, it is all up to your XSLT; you can test it in any other XML/XSLT envirnoment, and when you are sure it produces the HTML you want, you can put your xml content in drupal as nodes, and use the module to associate them with your XSLT script.

Good luck.

rovo’s picture

Great, sounds like this will do it with a little work on an xslt script. I see in the example simple-article.xslt script you provided, it recognizes tags like, "title" and "para" ;


... is it possible to have it also recognize characters in the XML, like "[[" or "===" ?

I'm just trying to figure out, without investing to much time, if it is even possible for xslt to recognize the brackets used for interlinking on mediawiki sites, and have it convert those to links?

Or is it possible to just use the freelinking input filter in conjunction with the XML filter ?

Just trying to figure the best route to forge. Thank You.

weam’s picture

Status: Active » Closed (fixed)

The provided XSLT script is an example script to showcase the module for users who are already conversant with XSLT, and is not written to be extended or something of the sort. Usually your scripts would be much more complex!

I'm not sure what you want to do, and what exactly is the type of content that you are transforming. I would suggest that you learn more about XML and XSLT, and the exact format of the data you are trying to transform. The web is rich with relevant resources, and this is really not related to XML Content module. XML Content requires XML in the node body, and a valid XSLT script.

Good luck.