문제

what do I need to use XSLT 2.0 with Delphi(win32)? At the moment I use MSXML6 for all my xml transformation. But MSXML6 has no support for XSLT 2.0.

The solution (by ErvinS)
Using the AltovaXML library. After installation you have to import the AltovXML typelibrary. Then you can use a source like this:

procedure TfrmMainAltovaXmlDemo.btnTransformClick(Sender: TObject);
var
  xmlApp: AltovaXMLLib_TLB.Application;
  xslt2: AltovaXMLLib_TLB.XSLT2;
begin
  xmlApp := AltovaXMLLib_TLB.CoApplication.Create;
  xslt2 := xmlApp.XSLT2;
  xslt2.InputXMLFromText := FInputXml;
  xslt2.XSLFromText := FXslSource;
  FOutputXML := xslt2.ExecuteAndGetResultAsString;
end;
도움이 되었습니까?

해결책

Altova has AltovaXML, which is a free COM based component.

다른 팁

As far as I know there is no XSLT 2.0 implmenentation for Delphi itself.
In general, there are only a few XSLT 2.0 implementations around.
Wikipedia has an overview of XSLT processors.

  • SAXON has an open source implementation of XSLT 2.0 in Java and .NET.
  • XJR is a paid implementation in C/C++.

You can integrate all of them in your Delphi apps.
Depending on how close you want to have such an integration, there are a few starting points:

--jeroen

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top