Hello,

I would like to check a xml file with a xsd file.

I try to use the  xslt: component but it doesn't work. 

this is my xml file: 

<?xml version="1.0"?>

<element_racine xmlns:xsi="schema.xsd">
  
  <nombre>90</nombre>
  <nombre>80</nombre>
  <nombre>99</nombre>
</element_racine>



this is my xsd file :

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified">
 
<xsd:simpleType name="entre50et100">
<xsd:restriction base="xsd:positiveInteger">
  <xsd:minExclusive value="50"/>
  <xsd:maxExclusive value="100"/>
</xsd:restriction>
</xsd:simpleType>
 
<xsd:element name="nombre" type="entre50et100"/>
 
<xsd:element name="element_racine">
<xsd:complexType>
<xsd:sequence>
  <xsd:element ref="nombre" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>




and this is my route :

    public void configure() {
 
        // error channel
    
errorHandler(deadLetterChannel("file:dead/?fileName=${date:now:yyyy-MM-dd}/${id}").useOriginalMessage());
 
        // Incoming file
 
                from("file:input/test.xml")
                .log("Starting to process file")
                .to("xslt:META-INF/XSDDocument/test.xsd")
                .bean(Services.class, "check")
                .to("direct:unknownIncoming");
 
    }


I put a breakpoint in check method. When i use debugger, there is a error
message : 

"Failed to create route route1 at: >>>
To[xslt:META-INF/XSDDocument/test.xsd] <<< in route:
Route[[From[file:input/?noop=true&initia... because of Failed to resolve
endpoint: xslt://META-INF/XSDDocument/test.xsd due to: *Impossible de
compiler la feuille de style*

I translate : *"Failed to compile stylesheet" *

Thank you for your help







--
View this message in context: 
http://camel.465427.n5.nabble.com/xslt-component-tp5722391.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to