07-29-04 10:51 PM
Hello,
>In order to be able to handle parsing errors ourselves, we created a pipeli
ne component that acts as a ffDissasembler. The code goes something like th
is:
>
>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 disassem
bler 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 ou
t 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 advantag
e of its features. You will get validation
and parsing and you can always extend the behavior of the out of the box dis
assembler.
The documentation on how to extend a the flat file disassembler is here:
http://msdn.microsoft.com/library/e...me=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.
[ Post a follow-up to this message ]
|