08-29-2006 8:01 AM
Hello,
we´re using a 6.20 system (XI not available) and want to check XML files against a XML-schema definition file (xsd).
Is there a function in 6.20 available for this? Is it possible to use "CALL TRANSFORMATION" for it? I´ve seen other XSLT parser in the internet which are able to check a source XML against an XSD before transforming it to the result XML.
But is this possible with an 6.20 system?
Thank you for your help,
best regards,
Stefan
08-29-2006 8:32 AM
XSLT processor is available since basis 6.10, so you can CALL TRANSFORMATION.
08-29-2006 8:47 AM
08-29-2006 9:22 AM
Hello Sergey,
yes, I know that it is available on my system. But how can I use this to validate a XML file?
Best regards,
Stefan
08-29-2006 9:23 AM
Hello Raja,
thank you for this threads which describe a spolution. Unfortunately it works only for DTD, but not for XSD. is there any possibility to validate a XML against a XSD file?
best regards,
Stefan
08-29-2006 9:38 AM
if you already have a XSLT program which can do this job. create the same in SAP environment - SE80
and then use the stt as below.
CALL TRANSFORMATION (`<name of the xslt which can do the validateion`)
SOURCE XML = <source xml the one to be validated>
RESULT XML xml_out.
xml_out is the variable to receive the results.
Regards
Raja
09-06-2006 6:22 PM
Hi Raja,
I have similar situation. I tried to save the schema in SE80 before I do the CALL TRANSFORMATION, but SAP does not like the <xsd:schema> tags, Here is the error message I got when I tried to activate the XSLT program.
Illegal root element 'xsd:schema'.
Please if know any work around for this.
Thanks,
Suman
09-11-2006 3:48 PM
Hello,
unfortunately I do not have a XSL-file which can be used to validate a XML against a XSD-Schema (with CALL TRANSFORMATION). If you have one, can you send it to me, please?
Best regards,
Stefan
09-11-2006 5:49 PM
Here is the sample XML and the schema.
XML:
<?xml version="1.0" encoding="UTF-8"?>
<book isbn="0836217462">
<title>
Being a Dog Is a Full-Time Job
</title>
<author>Charles M. Schulz</author>
<character>
<name>Snoopy</name>
<friend-of>Peppermint Patty</friend-of>
<since>1950-10-04</since>
<qualification>
extroverted beagle
</qualification>
</character>
<character>
<name>Peppermint Patty</name>
<since>1966-08-22</since>
<qualification>bold, brash and tomboyish</qualification>
</character>
</book>
XSD:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="book">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<xs:element name="author" type="xs:string"/>
<xs:element name="character" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="friend-of" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="since" type="xs:date"/>
<xs:element name="qualification" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="isbn" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
- Suman
09-12-2006 5:29 AM
check this weblog.
<a href="/people/tobias.trapp/blog/2006/08/22/xml-processing-in-abap-part-8--using-xslt-for-validation">XML Processing in ABAP Part 8 - Using XSLT for Validation</a>
Regards
Raja
09-12-2006 9:52 AM
Hello Suman,
as far as I can see you´ve posted the XSD file. This will of course not work for CALL TRANSFORMATION (which expects an XSLT file). Or do I misunderstand here something!?
Best regards,
Stefan
09-12-2006 9:54 AM
> check this weblog.
>
> <a href="/people/tobias.trapp/blog/2006/08/22/xml-processing-in-abap-part-8--using-xslt-for-validation">XML
> Processing in ABAP Part 8 - Using XSLT for
> Validation</a>
>
> Regards
> Raja
Hello Raja,
this web-log is about nearly the same problem. Unfortunately it is only working for schematron XML specifications; but this is no solution for W3C XML schema.
Best regards,
Stefan
09-12-2006 2:45 PM
Hi Stefan,
I know this off course don't work for the validation. I think Raja's solution mislead me in believing that we can use the SE80 stylesheet tool and the CALL TRANSFORMATION for the purpose of validation.
Now I have concluded that we can't use CALL TRANSFORMATION for the validation purposes. I have created a OSS Note to SAP, hopefully I may get some answer from them.
Thanks,
Suman
09-12-2006 6:57 PM
Hi All,
Here is the reply I got from SAP OSS.
"No, there is no schema validator integrated in the ABAP server (not even in the current release)."
I guess we should find a alternative way at this point.
- Suman