Re: [Servingxml-help] pos file repeating sections to nested XML
Brought to you by:
danielaparker
From: Daniel P. <dan...@sy...> - 2005-11-27 01:12:33
|
Ken, Currently, support is limited to a single repeating group at the tail of a record. The items in the group may be heterogenous and have different record types, if a test evaluated against the leading fields of an item can reveal the type, see the segments example. But that doesn't cover your case below. Mixing multiple repeating groups with fields means we need to be able to determine where the group ends. One way is to allow repeating groups to be separated by field delimiters (we actually support that with an older, no longer documented, approach), but that also won't cover your case below. Your case would require separating repeating groups based on pattern matching on a field, in particular, a field recognizable as a year field. Can you just confirm that in your requirements, there is no delimiter as such to identify the end of the group, but that the end must be determined by characteristics of the next field value? Thanks, Daniel ----- Original Message ----- From: "Brewer, Ken" <ken...@pe...> To: <ser...@li...>; "'Daniel Parker '" <dan...@sy...> Sent: Saturday, November 26, 2005 2:15 PM Subject: Re: [Servingxml-help] pos file repeating sections to nested XML > Thanks for such prompt response and solution! I'll try the new release. > The > workaround script you provided worked perfectly. That leads to me another > question - big surprise huh. What if there are multiple repeating sections > scattered throughout the record - how do I specify how many times it > repeats > or where it ends and regular fields start again? > > Here's an example of the record with soI've me attempted ascii-art > annotation(view with non-truetype font), the actual record begins with > 'JANE'. > > S | > T | > R | > U | > C | > T |----------------------------------------- > U || |(repeating)| | |(repeating) > R || |-----------| | |---------------- > E || | | | | | | | | | | > --|JANEENGLC-MATHA+1972BLUECHICAGOILATLANTAGA > F || | | | | | | | | | | > I |N S G S G Y C C S C S > E |a u r u r e o i t i t > L |m b a b a a l t a t a > D |e j d j d r o y t y t > S | e e e e B r e e > | c c o > | t t r > | n > > > example disired output: > > <StudentGrades> > <StudentGrade> > <Name>JANE</Name> > <SubjectGrade> > <Subject>ENGL</Subject> > <Grade>C-</Grade> > </SubjectGrade> > <SubjectGrade> > <Subject>MATH</Subject> > <Grade>A+</Grade> > </SubjectGrade> > <YearBorn>1972</YearBorn> > <Color>BLUE</FavoriteColor> > <Address> > <City>CHICAGO</City> > <State>IL</City> > </Address> > <Address> > <City>ATLANTA</City> > <State>GA</City> > </Address> > </StudentGrade> > <StudentGrade> > <!-- this 2nd record omitted for brevity --> > </StudentGrade> > </StudentGrades> > > Thanks again, > > -Ken > |