377장. XSLT 구성 요소

Camel 버전 1.3에서 사용 가능

xslt: 구성 요소를 사용하면 XSLT 템플릿을 사용하여 메시지를 처리할 수 있습니다. Templating을 사용하여 요청에 대한 respopnses를 생성할 때 이상적입니다.

377.1. URI 형식

xslt:templateName[?options]

URI 형식에는 다음 중 하나일 수 있는 templateName 이 포함됩니다.

  • 호출할 템플릿의 classpath-local URI
  • 원격 템플릿의 전체 URL입니다.

다음 형식으로 URI에 쿼리 옵션을 추가할 수 있습니다.

?option=value&option=value&…​

URI 구문에 대한 자세한 내용은 Spring Documentation 을 참조하십시오.

표 377.1. URI 예

URI설명

xslt:com/acme/mytransform.xsl

classpath의 com/acme/mytransform.xsl 파일을 참조합니다.

xslt:file:///foo/bar.xsl

/foo/bar.xsl 파일을 참조합니다.

xslt:http://acme.com/cheese/foo.xsl

원격 http 리소스 참조

Camel 2.8 이상의 경우 Maven 사용자는 이 구성 요소에 대해 다음 종속성을 pom.xml 에 추가해야 합니다.

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-spring</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>

Camel 2.9 부터 XSLT 구성 요소는 camel-core에 직접 제공됩니다.