XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Farshad KhoshpasandSubject: How to validate a source xml via XML Transformation Service?
Author: Farshad Khoshpasand
Date: 03 Jan 2007 06:12 AM
Hi,
I am a Sonicsoftware user and what i am trying to achieve in Sonic Management Console is to create a XML Transformation Service, which must validate the incomming xml document before it attempts to transform it. I have also created a xslt script which must be used by this service.
I configured the Service instance by setting its validation flag to true as well as telling where to find the xsd file.

I used the <xsl:import> in my xslt script in order to make the xslt awre of a schema that must be used in order to validate the incomming xml document but it didn't work as i thought.
Now: I don't know what is wrong with this picture to be honest. Here is my example

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet exclude-result-prefixes="xsl" version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import-schema schema-location="sonicfs:///Resources/XSD/MyXSDFile.xsd"/>
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
...
...
...
</xsl:template>
</xsl:stylesheet>


Thanks in advance for any kind of helping suggestions
F.K.

Postnext
Minollo I.Subject: How to validate a source xml via XML Transformation Service?
Author: Minollo I.
Date: 03 Jan 2007 11:56 AM
Fashad,
I would suggest that you contact Sonic Software for help:
http://www.sonicsoftware.com/support/index.ssp

Postnext
Farshad KhoshpasandSubject: How to validate a source xml via XML Transformation Service?
Author: Farshad Khoshpasand
Date: 04 Jan 2007 03:34 AM
Thanks Minollo,
I'll do that.
Regards
Farshad

Postnext
Farshad KhoshpasandSubject: How to validate a source xml via XML Transformation Service?
Author: Farshad Khoshpasand
Date: 09 Jan 2007 08:41 AM
Hi Farshad,
> NOTE: The incoming XML document doesn't include any reference to any
> schema ".xsd" file.

You wouldn't be able to use the Transformation Service Validate option in this case. "Sonic ESB V6.1 Developer's Guide" page 167 says:

"Select True if you want to validate the incoming XML against a Document Type Definition (DTD) or schema before transforming it. If you select True, then incoming XML messages must specify and provide a DTD or schema against which to validate the XML. The transformation fails when you set this value to True and the incoming message does not specify a DTD or schema for the validation".

Would you be able to edit the incoming message to add the necessary schema bits before sending it to the Transformation Validating step?

Regards, Aouali

Posttop
Farshad KhoshpasandSubject: How to validate a source xml via XML Transformation Service?
Author: Farshad Khoshpasand
Date: 09 Jan 2007 08:42 AM

Thank you Aouali,
Yes I have already done it (by transforming the source xml to an exactly same xml plus reference to a schema location)and it works perfect.
But what I meant earlier was, if there is any way in which you tell the service to locate the schema to be used for validation process.
And now as I understand from your explanation, there is no way for the XML Transfromation Service instance to locate the schema when the source xml itself doesn't contain any reference to any schema.
The problem is now solved and that is the main issue here.

Regards
Farshad

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.