开发者

Is there an XSLT to translate from a BizTalk schema to a W3C XML Schema?

I have an XML document generated by a 3rd party using BizTalk, and I have the BizTalk schema for that document, but I need to validate the document against the schema in .NET. When I try to load the BizTalk schema I get this message:

'XmlSchemaSet' can load only W3C开发者_运维问答 XML Schemas

Is there some way, possibly an XSLT, to convert from a BizTalk schema language to the W3C XML Schema language?


A "Schema" that need to be deployed in BizTalk for use within the platform starts its life as plain vanilla W3C XML Schema, that is a file with a .xsd extension.

Then, the BizTalk Visual Studio project system converts this plain XML representation of an XSD schema to a .NET class derived from SchemaBase in a compiled .Net assembly to make it more suitable for the BizTalk runtime to consume it.

If you want to validate any given XML document against the schema in .NET, the simplest solution is to get hold of the W3C Schema file originally used as the source for the corresponding BizTalk artifact.

However, if this is not possible, you can reference the .NET assembly that contains the compiled artifact and use reflection to instantiate the generated class. Then, you can use its Schema property to retrieve an instance of the XmlSchema object.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜