Tool to apply XSL to XSD? [closed]

2019-04-02 09:00发布

问题:

I have an XSL file and an XSD file on my local disk.

The XSL file is supposed to transform the XSD file to OWL format.

What freeware tool can I use apply this transformation? Thanks.

回答1:

The XSL file is supposed to transform the XSD file to OWL format.

What freeware tool can I use apply this transformation?

You can use any existing free XSLT processor, but it should implement the version of XSLT as specified of the version attribute of the <xsl:stylesheet> (top) element of the stylesheet module.

Here is a rather incomplete list of such XSLT processors:

XSLT 1.0 processors:

  1. MSXML 3/4/6.

  2. Saxon 6.5.5

  3. XML-Spy (AltovaXML).

  4. .NET XslTransform.

  5. .NET XslCompiledTransform.

  6. LibXMl/LibXSLT.

  7. JD.

  8. Xalan/C or Xalan/J.

XSLT 2.0 processors

  1. Saxon 9.x.

  2. AltovaXML2010.

  3. XQSharp (Beta).

  4. IBM WebSphere XML Pack (not free).

  5. Intel® SOA Expressway XSLT 2.0 Processor (not free).

XSLT IDEs

  1. MS Visual Stusio (2010 or 2008) -- works only with XslCompiledTransform

  2. oXygen -- works with all mentioned XSLT processors

  3. XSelerator -- works with all mentioned XSLT processors

  4. Kernow: simple, Java-based IDE for Saxon.



回答2:

Kernow is a good free tool for applying XSLT transformations. It's java-based.



回答3:

Take a look at Saxon http://saxon.sourceforge.net/



回答4:

Not that XSLT 1.0 and XSLT 2.0 are two different transformation languages. You should check the namespace used in the XSL file to find out if you need an XSLT 1.0 or XSLT 2.0 processor (the most probable answer is '1.0').

Your web browser already has an XSLT 1.0 processor, though it may not be convenient to use it. You have to modify the input document (XSD in your case) to add the following line at the top (where xsd2owl.xsl is the path to your XSLT). Then, you just have to open the file with the browser.

<?xml-stylesheet href="xsd2owl.xsl" type="text/xsl" ?>

Also, xsltproc is the Libxslt-based command-line tool that does XSLT 1.0 tranformation and has some EXSLT extensions. You'll find it packaged for every Linux distribution. Follow this link for Windows downloads.



回答5:

Quick start with XSLT 1.0 on:

Windows

Download MSXSL. A small (24KB) command line utility that makes use of a library you already have on your system (msxml). Run msxsl.exe.

Linux

apt-get xsltproc
xsltproc


标签: xml xslt