Re: [Servingxml-help] pos file repeating sections to nested XML
Brought to you by:
danielaparker
From: Daniel P. <dan...@sy...> - 2005-11-28 03:11:14
|
Ken, Okay, I understand your requirement. Adding a count attribute to sx:repeatingGroup is easy. Supporting multiple repeating groups intermixed with field definitions is a little more work. I don't have much time this week, but I should be able to put out a release in the following week that implements these features. -- Daniel ----- Original Message ----- From: "Brewer, Ken" <ken...@pe...> To: <ser...@li...>; "'Daniel Parker '" <dan...@sy...> Sent: Saturday, November 26, 2005 10:51 PM Subject: Re: [Servingxml-help] pos file repeating sections to nested XML > Daniel, > > There is no delimiter to identify the end of a repeating group in my file. > Instead, the documentation for the import file indicates how many times a > group repeats and suggests doing the math to determine where the repeating > group ends. For example, if the address section repeats 10 times, then the > whole repeating group is 90 characters wide(based on my example record > below) and the next normal field begins after that. > > It seems like the pattern matching approach could be buggy i.e. if the > repeating group fields and the subsequent normal field(to match on) were > all > numbers i.e. 19721964 where 1-2 and 3-4 are fields of a 2 field repeating > group but 5-8 is a normal field. Ideally though, it would be nice if there > was a more finite way i.e. if the repeatingGroup element honored an > attribute such as 'count="10"'. The example I gave below is not my exact > record layout and I have several files with similar problems. I will take > a > second look at the docs for them, maybe the datatypes of the fields > adjacent > to the repeating group are different than the repeating group such that > pattern matching would work reliably. > > Can servingxml perform multiple passes e.g. if we know that address > repeats > 10 times for a total of 90 characters, can we parse it out as one 90 > character field then, in a 2nd pass, parse that as a separate record where > the whole record is one repeating group? > > Even if servingxml doesn't support this directly, it seems like it could > be > done by driving servingxml from Java(embedded mode) with multiple resource > scripts(or services) by passing the 1st service the whole record, then > passing the 90 character address group to a 2nd service, and so on. Maybe > more work and less ideal but still much better than writing the whole > thing > myself! > > Thanks again, > > Ken > |