|
Home > Archive > BizTalk Server General > July 2004 > Using IFFDocumentSpec question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using IFFDocumentSpec question
|
|
| The Gremlin 2004-07-29, 5:51 pm |
| In order to be able to handle parsing errors ourselves, we created a pipeline component that acts as a ffDissasembler. The code goes something like this:
IFFDocumentSpec docspec = (IFFDocumentSpec) pContext.GetDocumentSpecByType(sNamespace + "#" + sNodoRaiz);
XmlReader xr = docspec.Parse(new DataReader(bodyPart.Data, true));
It works pretty well with one problem. It wont validate things like regular expressions or size of positional fields. What we need is something akin to "Validate document structure". How can we achieve this under these conditions
| |
| Gilles [MSFT] 2004-07-29, 5:51 pm |
| Hello,
>In order to be able to handle parsing errors ourselves, we created a pipeline component that acts as a ffDissasembler. The code goes something like this:
>
>IFFDocumentSpec docspec = (IFFDocumentSpec) pContext.GetDocumentSpecByType(sNamespace + "#" + sNodoRaiz);
>
>XmlReader xr = docspec.Parse(new DataReader(bodyPart.Data, true));
>
>It works pretty well with one problem. It wont validate things like regular expressions or size of positional fields. What we need is something akin to "Validate
>document structure". How can we achieve this under these conditions
I am not exactly sure what you are trying to achieve so I'll take a stab at it and please let me know if I am wrong.
I understand that you have a custom disassembler component and this disassembler produces some XML instance that you would
like to verify if the flat file is actually "good" or not.
If this is the case, the following approaches are available to you:
1) Implement validation yourself (I am sure you figured this out)
2) After the XML has been produced, varify it against a schema, using the out of the box validating XML component
or using custom code using the .NET validating reader.
3) Extend the flat file disasembler component (FFDAsmComp) and take advantage of its features. You will get validation
and parsing and you can always extend the behavior of the out of the box disassembler.
The documentation on how to extend a the flat file disassembler is here:
http://msdn.microsoft.com/library/e....asp?frame=true
I have the feeling that I have not fully understood your question so please let me know if you need more help.
Thanks.
-Gilles.
|
|
|
|
|