servingxml-help Mailing List for ServingXML (Page 9)
Brought to you by:
danielaparker
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(11) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(6) |
Feb
(9) |
Mar
(1) |
Apr
(7) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(8) |
Nov
|
Dec
(2) |
2007 |
Jan
(2) |
Feb
|
Mar
(14) |
Apr
(25) |
May
(5) |
Jun
(1) |
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(5) |
Aug
(1) |
Sep
(4) |
Oct
(3) |
Nov
(3) |
Dec
(7) |
2010 |
Jan
(2) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(3) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(1) |
2011 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(20) |
Dec
(24) |
2015 |
Jan
(25) |
Feb
(20) |
Mar
(29) |
Apr
(12) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
(3) |
Dec
(7) |
2016 |
Jan
(7) |
Feb
(5) |
Mar
(7) |
Apr
(5) |
May
(4) |
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(5) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Allen, C. <chr...@wo...> - 2009-10-28 21:23:39
|
I'm trying to embed a formatted date into an <sx:positionalField>. I assume it can be done, but I'm getting tripped up on syntax. How can I specify the parameter "dob" as the label in the <sx:positionalField>? <sx:flatRecordType id="FHDR" name="FHeader"> <sx:positionalField width="..." ... /> <sx:parameter name="dob"> <sx:convertDate fromFormat="yyyy-MM-dd" toFormat="MMddyyyy"> <sx:toString value="{$runDate}"/> </sx:convertDate> </sx:parameter> <sx:positionalField width="8" name="accruedDate" label="{dob}"/> <sx:positionalField ... /> </sx:flatRecordType> Thanks much for any help! -Christopher ******************************************************************************************************************************* IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email in error, please notify the system manager or the sender immediately and do not disclose the contents to anyone or make copies thereof. *** eSafe scanned this email for viruses, vandals, and malicious content. *** ******************************************************************************************************************************* |
From: Alberto B. <abr...@og...> - 2009-10-20 08:30:36
|
First of all let me say that servingxml is a great great tool! I have a csv file with multiple types of records and the field that discriminate the type of record is the last one(!). Is there a simple way to obtain it without rearrange the input file? Sorry if it is a silly question; I read the documentation but I didn't find an answer. thanks in advance Alberto |
From: Netlog <no...@ne...> - 2009-09-17 08:13:23
|
Hola Jose Andre, Has recibido este mensaje de correo electrónico porque eres un miembro de Netlog. Tu cuenta de Netlog: http://es.netlog.com/joseandresantos 1 mensaje nuevo en tu bandeja de entrada.http://es.netlog.com/go/messages 2 notificaciones sin leer.http://es.netlog.com/go/logs/notifications Estado -- Aún no tienes un foto de perfil. Agrega una foto de perfil: http://es.netlog.com/go/manage/photos/view=add Descarga una foto: http://es.netlog.com/go/manage/photos/view=add Escribe un mensaje de blog: http://es.netlog.com/go/manage/blog/view=add Escribe un shout para tus amigos http://es.netlog.com/joseandresantos/shouts/view=withfriends&add=1 Marcas destacadas -- mtv: http://es.netlog.com/mtv la_furia_roja: http://es.netlog.com/la_furia_roja converse: http://es.netlog.com/converse nike: http://es.netlog.com/nike ipod: http://es.netlog.com/ipod Vídeos populares -- Bellos Besos http://es.netlog.com/go/explore/videos/videoid=es-1337954 Visto 52.588 veces _kamasutra_** http://es.netlog.com/go/explore/videos/videoid=es-1302662 Visto 39.367 veces Cuidado con lo que ven chavos http://es.netlog.com/go/explore/videos/videoid=es-153078 Visto 24.434 veces RECOPILACION http://es.netlog.com/go/explore/videos/videoid=es-2566639 Visto 17.045 veces Eventos -- CONCIERTO DE SLAP OUT EN LA SA ... jueves 17 septiembre Sala Caracol, Madrid http://es.netlog.com/go/explore/events/eventid=60397 MR.BIG viernes 18 septiembre La Riviera, Madrid http://es.netlog.com/go/explore/events/eventid=60141 Fiesta en Alegoria. Madrid sábado 19 septiembre Discoteca Alegoría, Madrid http://es.netlog.com/go/explore/events/eventid=60543 Japan Weekend sábado 26 septiembre Pabellón de convenc ..., Madrid http://es.netlog.com/go/explore/events/eventid=60131 Carrera de la Solidaridad domingo 27 septiembre MADRID, MADRID http://es.netlog.com/go/explore/events/eventid=61108 El Equipo de Netlog ---------------------------------------------------------------- Has recibido este mensaje de correo electrónico porque eres un miembro de Netlog. Tu cuenta de Netlog: http://es.netlog.com/joseandresantos ¿No quieres recibir más actualizaciones en tu e-mail? Edita los ajustes en tu perfil Netlog Tablero: http://es.netlog.com/go/settings/email ---------------------------------------------------------------- Netlog NV/SA. Calle Lopez de Hoyos 35, Primer Piso. Madrid, 28002. España. BE0859635972. abu...@ne... |
From: seleccionado - g. <of...@ca...> - 2009-09-14 14:57:01
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Envíos publicitarios personalizados</title> <style type="text/css"> <!-- body { margin: 10px; } body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #666666; } a:link { color: #666666; } a:visited { color: #666666; } a:hover { color: #666666; } a:active { color: #666666; } Estilo1 {color: #000000} --> </style> </head> <body> <img src="http://www.canalmailcorp.com/tic.jsp?a=10245.64335280.L.canalmail" height=1 width=1> <div align="center">Publicidad</div> <p>Estimad@ usuari@,</p> <p>Nuestro sistema aleatorio ha seleccionado su dirección de email de entre cerca de 25.000 usuarios para llevarse un fabuloso viaje para dos personas. </p> <p>La participación es totalmente GRATUITA y ademas puedes elegir donde irte de viaje (Europa, Asia, Africa, America, Crucero o Caribe).</p> <p>Por el hecho de haber sido seleccionado, por favor haga clic <a href="http://www.canalmailcorp.com/tcc.jsp?a=10245.64335280.C.canalmail.13">aquí</a>:</p> <p>Le deseamos mucha suerte y aprovechamos la oportunidad para agradecerle su confianza</p> <p align="left"> </p> <p align="left"><img src="http://www.hotelbono.com/maui/scripts/v.php?cod=286"/></p> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <div align="center" style="font-family:arial, verdana; font-size:11px; color:#666666;">Puedes revocar tu consentimiento para la recepción de mensajes en tu area privada <a href="http://www.canalmail.com/indicesusnws.do" style="color:#0000FF">pulsando aquí</a><br>© 2008 GRUPO CANALMAIL, CIF: B82604646 - Todos los derechos reservados </div></td></tr></table> </body> </html> |
From: Netlog <no...@ne...> - 2009-09-09 23:22:10
|
Hey joseandresantos, ¡Netlog te desea un feliz cumpleaños! Disfruta al máximo tu gran día. Te damos una semana gratis de Netlog Super! Haz clic aquí para recibir tu regalo: http://es.netlog.com/go/collectgiftbirthdaygift/c=c65f2f7c670a33c1390b6af7858713ce&auth=dfde6a78db12b4aecfeff9ecbb6926bc&un=joseandresantos (Este link sólo es válido 2 semanas) ¡Felicidades y que pases un gran día! El Equipo de Netlog ---------------------------------------------------------------- Netlog NV/SA. Calle Lopez de Hoyos 35, Primer Piso. Madrid, 28002. España. BE0859635972. abu...@ne... |
From: Brian R. <bri...@al...> - 2009-09-01 15:20:11
|
I've spent far too long trying to match up my flat file format with similar examples, and have not been able to get a successful result. Here is my flat file format: 254844~123456789~SMITH~PAULA~FOLDER~001~04/09/2007 @E:\PENSIONS MEMBERS\001\00000\00000001.TIF @E:\PENSIONS MEMBERS\001\00000\00000002.TIF @E:\PENSIONS MEMBERS\001\00000\00000003.TIF @E:\PENSIONS MEMBERS\001\00000\00000004.TIF @E:\PENSIONS MEMBERS\001\00000\00000005.TIF 250233~123456789~SMITH~PERRIE~FOLDER~001~04/09/2007 @E:\PENSIONS MEMBERS\001\00000\00000006.TIF @E:\PENSIONS MEMBERS\001\00000\00000007.TIF @E:\PENSIONS MEMBERS\001\00000\00000008.TIF @E:\PENSIONS MEMBERS\001\00000\00000009.TIF @E:\PENSIONS MEMBERS\001\00000\00000010.TIF @E:\PENSIONS MEMBERS\001\00000\00000011.TIF @E:\PENSIONS MEMBERS\001\00000\00000012.TIF @E:\PENSIONS MEMBERS\001\00000\00000013.TIF @E:\PENSIONS MEMBERS\001\00000\00000014.TIF @E:\PENSIONS MEMBERS\001\00000\00000015.TIF @E:\PENSIONS MEMBERS\001\00000\00000016.TIF @E:\PENSIONS MEMBERS\001\00000\00000017.TIF @E:\PENSIONS MEMBERS\001\00000\00000018.TIF @E:\PENSIONS MEMBERS\001\00000\00000019.TIF @E:\PENSIONS MEMBERS\001\00000\00000020.TIF @E:\PENSIONS MEMBERS\001\00000\00000021.TIF @E:\PENSIONS MEMBERS\001\00000\00000022.TIF @E:\PENSIONS MEMBERS\001\00000\00000023.TIF ... I'd like to generate XML that looks like this: <PensionMember> <PayrollNumber>254844</PayrollNumber> <SSN>123456789</SSN> <LastName>Smith</LastName> <FirstName>Paula</FirstName> <DocType>Folder</DocType> <RollNumber>001</RollNumber> <ScanDate>2007-04-09</ScanDate> <Files> <File>0000\00000001.TIF</File> <File>0000\00000002.TIF</File> <File>0000\00000003.TIF</File> <File>0000\00000004.TIF</File> <File>0000\00000005.TIF</File> </Files> </PensionMember> I think I need help with the concepts; for example, do I have one record type or two? Do I have a repeating group or not? I've tried several different things, but I can't figure out how to get files to be recognized as something other than a <PensionMember>. Any help would be greatly appreciated! Thanks, -Brian Brian R. Robinson | Director, Services | Alfresco m. (609) 870-4724 | e. bri...@al... | skype. brian.robinson Introducing Alfresco Community 3.2 - E-Mail, Mobile, CMIS: Download & More Details |
From: Seleccionado-Mercedes <of...@ca...> - 2009-07-22 07:38:20
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Seleccionado Mercedes</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div align="center">Publicidad</div> <img src="http://www.canalmailcorp.com/tic.jsp?a=10236.34198270.L.canalmail" height=1 width=1> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <img src="http://www.aldaniti.net/scripts/v.php?pk=OTkwk9x"/> <tr> <td><div align="center"> <table width="740" height="390" border="0" cellpadding="0" cellspacing="0"> <tr> <td><table id="Tabla_01" width="738" height="390" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <a href="http://www.canalmailcorp.com/tcc.jsp?a=10236.34198270.C.canalmail.11" target="_blank"><img src="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/teaser_01.jpg" alt="" width="420" height="53" border="0"></a></td> <td> <a href="http://www.canalmailcorp.com/tcc.jsp?a=10236.34198270.C.canalmail.11" target="_blank"><img src="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/teaser_02.jpg" alt="" width="286" height="53" border="0"></a></td> <td> <img src="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/teaser_03.jpg" width="32" height="53" alt=""></td> </tr> <tr> <td> <a href="http://www.canalmailcorp.com/tcc.jsp?a=10236.34198270.C.canalmail.11" target="_blank"><img src="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/teaser_04.jpg" alt="" width="420" height="180" border="0"></a></td> <td width="286" height="180" background="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/teaser_05.gif" bgcolor="#6A7675"> <div align="center"> <table width="250" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><div align="left"><a href="http://www.canalmailcorp.com/tcc.jsp?a=10236.34198270.C.canalmail.11" target="_blank" style="FONT-SIZE: 11px; COLOR: #fff; FONT-FAMILY: arial; TEXT-DECORATION: none" ><strong>Hola,</strong></a></div></td> </tr> <tr> <td><div align="center"><img src="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/spacer.gif" width="230" height="12"></div></td> </tr> <tr> <td><div align="justify"><a href="http://www.canalmailcorp.com/tcc.jsp?a=10236.34198270.C.canalmail.11" target="_blank" style="FONT-SIZE: 11px; COLOR: #fff; FONT-FAMILY: arial; TEXT-DECORATION: none" ><strong>Nuestro sistema aleatorio ha seleccionado su dirección de email de entre cerca de 25.000 usuarios para llevarse un fabuloso Mercedes-Benz (modelo a elegir).</strong></a></div></td> </tr> <tr> <td><div align="center"><img src="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/spacer.gif" width="230" height="12"></div></td> </tr> <tr> <td><div align="justify"><a href="http://www.canalmailcorp.com/tcc.jsp?a=10236.34198270.C.canalmail.11" target="_blank" style="FONT-SIZE: 11px; COLOR: #FFFF00; FONT-FAMILY: arial; TEXT-DECORATION: none" ><strong>¡La participación es totalmente "GRATUITA" y el coche se entregará en un Concesionario Oficial!</strong></a></div></td> </tr> </table> </div></td> <td> <img src="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/teaser_06.jpg" width="32" height="180" alt=""></td> </tr> <tr> <td> <a href="http://www.canalmailcorp.com/tcc.jsp?a=10236.34198270.C.canalmail.11" target="_blank"><img src="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/teaser_07.jpg" alt="" width="420" height="52" border="0"></a></td> <td> <a href="http://www.canalmailcorp.com/tcc.jsp?a=10236.34198270.C.canalmail.11" target="_blank"><img src="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/teaser_08.jpg" alt="" width="286" height="52" border="0"></a></td> <td> <img src="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/teaser_09.jpg" width="32" height="52" alt=""></td> </tr> <tr> <td height="105" colspan="3"> <div align="center"> <table width="700" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><div align="center"><a href="http://www.canalmailcorp.com/tcc.jsp?a=10236.34198270.C.canalmail.11" target="_blank" style="FONT-SIZE: 11px; COLOR: #6A7675; FONT-FAMILY: arial; TEXT-DECORATION: none" ><strong>Por el hecho de haber sido seleccionado, por favor haga clic en:</strong></a></div></td> </tr> <tr> <td><div align="center"><a href="http://www.canalmailcorp.com/tcc.jsp?a=10236.34198270.C.canalmail.11" target="_blank" style="FONT-SIZE: 11px; COLOR: #0000FF; FONT-FAMILY: arial; TEXT-DECORATION: underline" ><strong>http://www.seleccionado-mercedes.com</strong></a></div></td> </tr> <tr> <td><div align="center"><img src="http://promociones.canalmail.com/adsalsa/mercedes_mayo09/img_mail/spacer.gif" width="400" height="20"></div></td> </tr> <tr> <td><div align="center"><a href="http://www.canalmailcorp.com/tcc.jsp?a=10236.34198270.C.canalmail.11" target="_blank" style="FONT-SIZE: 11px; COLOR: #6A7675; FONT-FAMILY: arial; TEXT-DECORATION: none" >Le deseamos mucha suerte y aprovechamos la oportunidad para agradecerle su confianza.</a></div></td> </tr> </table> </div></td> </tr> </table></td> </tr> </table> </div></td> </tr> </table> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <div align="center" style="font-family:arial, verdana; font-size:11px; color:#666666;">Puedes revocar tu consentimiento para la recepción de mensajes en tu area privada <a href="http://www.canalmail.com/indicesusnws.do" style="color:#0000FF">pulsando aquí</a><br>© 2008 GRUPO CANALMAIL, CIF: B82604646 - Todos los derechos reservados </div></td></tr></table> </body> </html> |
From: Netlog <no...@ne...> - 2009-07-19 00:53:53
|
Hola Jose Andre, Has recibido este mensaje de correo electrónico porque eres un miembro de Netlog. Tu cuenta de Netlog: http://es.netlog.com/joseandresantos 1 mensaje nuevo en tu bandeja de entrada.http://es.netlog.com/go/messages 1 notificación sin leer.http://es.netlog.com/go/logs/notifications Estado -- Aún no tienes un foto de perfil. Agrega una foto de perfil: http://es.netlog.com/go/manage/photos/view=add Los últimos 30 días, tu perfil ha visitado 1 veces. Descarga una foto: http://es.netlog.com/go/manage/photos/view=add Escribe un mensaje de blog: http://es.netlog.com/go/manage/blog/view=add Escribe un shout para tus amigos http://es.netlog.com/joseandresantos/shouts/view=withfriends&add=1 Marcas destacadas -- la_furia_roja: http://es.netlog.com/la_furia_roja mtv: http://es.netlog.com/mtv converse: http://es.netlog.com/converse nike: http://es.netlog.com/nike ipod: http://es.netlog.com/ipod Vídeos populares -- Ms. Envy http://es.netlog.com/go/explore/videos/videoid=es-2714376 Visto 35.290 veces _kamasutra_** http://es.netlog.com/go/explore/videos/videoid=es-1302662 Visto 33.214 veces Cuidado con lo que ven chavos http://es.netlog.com/go/explore/videos/videoid=es-153078 Visto 24.660 veces RECOPILACION http://es.netlog.com/go/explore/videos/videoid=es-2566639 Visto 15.663 veces Eventos -- Concierto Madonna jueves 23 julio Estadio Vicente Cald ..., Madrid http://es.netlog.com/go/explore/events/eventid=57013 Nine inch Nails jueves 30 julio La Riviera, Madrid http://es.netlog.com/go/explore/events/eventid=58348 Wacken Open Air 2009 Alemania viernes 31 julio Wacken (Alemania), Wacken http://es.netlog.com/go/explore/events/eventid=53685 Rally solidario a Nouadhibou ( ... sábado 1 agosto Guadalix de la sierr ..., Madrid http://es.netlog.com/go/explore/events/eventid=58300 LoS KoMe KoMe sábado 8 agosto discoteca Quetzal, San Martin de Valdei ... http://es.netlog.com/go/explore/events/eventid=58051 El Equipo de Netlog ---------------------------------------------------------------- Has recibido este mensaje de correo electrónico porque eres un miembro de Netlog. Tu cuenta de Netlog: http://es.netlog.com/joseandresantos ¿No quieres recibir más actualizaciones en tu e-mail? Edita los ajustes en tu perfil Netlog Tablero: http://es.netlog.com/go/settings/email ---------------------------------------------------------------- Netlog NV/SA. Calle Lopez de Hoyos 35, Primer Piso. Madrid, 28002. España. BE0859635972. abu...@ne... |
From: Ken R. <Ken...@en...> - 2009-07-13 17:53:23
|
Hello, I'm new here so please be gentle. I've been tasked with mapping a large (2gig) flat file to xml and servicexml looks like the route to take to do that mapping. The file is of the format: BEG|id1|f3|f4|f5 DETBEG|id1|f2|f3 DET|id1|f2|f3 DET|id1|f2|f3 DET|id1|f2|f3 DET|id1|f2|f3 DETEND|id1|f2|f3 END|id1|f2 BEG|id2|f2|f3|f4 DETBEG|id2|f2|f3 DET|id2|f2|f3 DET|id2|f2|f3 DET|id2|f2|f3 DET|id2|f2|f3 DETEND|id2|f2|f3 END|id2|f2 Each record is surrounded by the BEG/END lines To start with I have been trying to map without the details to get the hang of how servingxml works. I have the following resource.xml: <?xml version="1.0"?> <sx:resources xmlns:sx="http://www.servingxml.com/core"> <sx:service id="myData"> <sx:serialize> <sx:xsltSerializer> <sx:outputProperty name="indent" value="yes"/> </sx:xsltSerializer> <sx:transform> <sx:content ref="myData"/> </sx:transform> </sx:serialize> </sx:service> <sx:recordContent id="myData"> <sx:flatFileReader> <sx:fileSource file="data/test.flat"/> <sx:flatFile ref="myFlatFile"/> </sx:flatFileReader> <sx:recordMapping ref="toXmlMapping"/> </sx:recordContent> <sx:flatFile id="myFlatFile"> <sx:flatFileBody> <sx:flatRecordTypeChoice> <sx:fieldDelimiter value="|"/> <sx:delimitedField name="recordType"/> <sx:delimitedField name="id"/> <sx:when test="recordType='BEG'"> <sx:flatRecordType name='BEG'> <sx:fieldDelimiter value="|"/> <sx:delimitedField name="recordType"/> <sx:delimitedField name="id"/> <sx:delimitedField name="date"/> </sx:flatRecordType> </sx:when> </sx:flatRecordTypeChoice> </sx:flatFileBody> </sx:flatFile> <sx:recordMapping id="toXmlMapping"> <records> <sx:groupBy fields="id"> <record> <sx:fieldAttributeMap field="id" attribute="id"/> <sx:fieldAttributeMap field="date" attribute="date"/> </record> </sx:groupBy> </records> </sx:recordMapping> </sx:resources> This works well for small flat files but throws an out of memory error on a full dataset. Is there a way to have it flush out the data after each record to avoid the problem? Regards. |
From: Curso D. E. <of...@ca...> - 2009-06-21 20:44:41
|
Publicidad |
From: Wolf, E. <Eri...@st...> - 2008-04-29 14:35:19
|
Hi, I am trying to utilize predicates within the onSubtree path expression and receive the following error: SEVERE: Error in element sx:onSubtree. The expression "/trades/trade[side='B']" is not recognized.. Unexpected token <name> <sx:onSubtree path="/trades/trade[side='B']"> Here is the xml: <trades> <trade> <orderDateString>07/26/2007</orderDateString> <orderId>32162</orderId> <price>1.0</price> <quantityType>CURRENCY</quantityType> <quantity>25.0</quantity> <rejectReason /> <side>B</side> <traderId>bos.statestreet.fcloader</traderId> <status>COMPLETED</status> <currency>USD</currency> </trade> <trade> <orderDateString>07/26/2007</orderDateString> <orderId>32163</orderId> <price>1.0</price> <quantityType>CURRENCY</quantityType> <quantity>85.62</quantity> <rejectReason /> <side>S</side> <traderId>bos.csam.fcloader</traderId> <status>COMPLETED</status> <currency>USD</currency> </trade> </trades> Any help would be greatly appreciated. Thanks, -Eric |
From: Peter K. <pet...@bl...> - 2008-04-04 09:18:05
|
Hi, I'm trying to read a Java-like property file as one record, where each property becomes a field (in contrast to the examples in ServingXml that treat each property as a separate record. I did not find any way to do this out-of-the-box, so I've written a PropertyReader, PropertyReaderFactory and PropertyReaderFactoryAssembler to do right this. This works fine when I include these new components into the servicemix source distribution as I did, but using it externally I couldn't get this to run, but that's another topic. The problem seems to be that the records do not have a fixed type associated and thus a field element mapping does not find the fields obviously. The file produced is this: --- <?xml version="1.0" encoding="UTF-8"?> <header xmlns="http://openview.hp.com/xmlns/conf/2003/04"> <policy> <ids> <container_id/> <version_id/> </ids> <name/> <version/> <description/> <files> <data> <encoding>text/plain</encoding> <checksum/> <file_name>data</file_name> </data> </files> </policy> <policytype> <container_id/> <version/> </policytype> </header> --- as one can see all tags are empty, the value from the record is missing. I tried already in PropertyReader to create a record type on the fly by just putting all property names into a record type and using this but without success. I'm lost, what am I doing wrong here? Thanks, Peter |
From: Daniel P. <dan...@gm...> - 2008-03-23 23:26:53
|
Peter, If you mail to the list a sample input file and expected output file, I'll see what I can do. -- Daniel ----- Original Message ----- From: <pa...@bl...> To: <ser...@li...> Sent: Sunday, March 23, 2008 6:59 PM Subject: [Servingxml-help] String not Char record delimiter in flat file > Hi, > > I'm trying to read a flat file with ServingXml 0.8.1 that has > multi-line records but the begin of a new record is marked by a > multi-char string such as "====>". > > First of all, although documentation states that all of start, end > attributes of sx:recordDelimiter are optional > > <sx:recordDelimiter start="====>"/> > > gives: > Error in element sx:recordDelimiter. The attribute "end" is required > > but I guess the basic problem is that the values of start and end > actually are characters that terminate/start a record not a string? > Because the outcome when running the pipeline with this is more than > strange, way too many empty records. > > So how can I then have a record delimiter that is not a simple \n\r > which does not work in this case? > > > Thanks, Peter > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Servingxml-help mailing list > Ser...@li... > https://lists.sourceforge.net/lists/listinfo/servingxml-help > > > > > E-mail message checked by Spyware Doctor (5.5.0.178) > Database version: 5.09470 > http://www.pctools.com/spyware-doctor/ E-mail message checked by Spyware Doctor (5.5.0.178) Database version: 5.09470 http://www.pctools.com/spyware-doctor/ |
From: <pa...@bl...> - 2008-03-23 22:59:43
|
Hi, I'm trying to read a flat file with ServingXml 0.8.1 that has multi-line records but the begin of a new record is marked by a multi-char string such as "====>". First of all, although documentation states that all of start, end attributes of sx:recordDelimiter are optional <sx:recordDelimiter start="====>"/> gives: Error in element sx:recordDelimiter. The attribute "end" is required but I guess the basic problem is that the values of start and end actually are characters that terminate/start a record not a string? Because the outcome when running the pipeline with this is more than strange, way too many empty records. So how can I then have a record delimiter that is not a simple \n\r which does not work in this case? Thanks, Peter |
From: Daniel P. <dan...@sy...> - 2007-12-05 05:49:53
|
Ravi, Default flat file mapping based on header fields is now supported in = version 0.8.1. See the updated flat-to-XML example "country default" -- Daniel ----- Original Message -----=20 From: ravi kishore=20 To: Daniel Parker=20 Sent: Tuesday, October 30, 2007 2:53 PM Subject: Mapping based on Header fields. Hi Daniel, I am trying to convert flat file to xml using servingxml. I.) Input_File1.csv Name, Designation, Contact, Location xxxx, xxxx, xxxx, xxxx 2.) Input_File2.csv Name, Location , Contact, Designation xxxx, xxxx, xxxx, xxxx I can have these header fields in random order in my input files as = above, I would like to map the data associated with the above fields = with a single resource file . Do Servingxml support dynamic mapping based on header fields? If so please guide on how to go about this. Thanks Ravi Kishore -------------------------------------------------------------------------= ----- Bring your gang together - do your thing. Start your group. |
From: Daniel P. <dan...@sy...> - 2007-08-31 03:18:23
|
The answer is in the FAQ (there's a link on the home page), question 2 = in the ServingXML markup section. -- Daniel ----- Original Message -----=20 From: ravi kishore=20 To: ser...@li...=20 Sent: Monday, August 27, 2007 11:42 AM Subject: [Servingxml-help] How to get the converted XML file as = multiplelines. Hi, I am using servingxml to convert csv file to xml. The output xml file as entire content in a single line. I would like to have it in multiple lines. How to go about this. Thanks Kishore -------------------------------------------------------------------------= --- Unlimited freedom, unlimited storage. Get it now=20 -------------------------------------------------------------------------= --- = -------------------------------------------------------------------------= This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a = browser. Download your FREE copy of Splunk now >> http://get.splunk.com/=20 -------------------------------------------------------------------------= --- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: ravi k. <krk...@ya...> - 2007-08-27 15:42:37
|
Hi, I am using servingxml to convert csv file to xml. The output xml file as entire content in a single line. I would like to have it in multiple lines. How to go about this. Thanks Kishore --------------------------------- Unlimited freedom, unlimited storage. Get it now |
From: Daniel P. <dan...@wi...> - 2007-08-13 04:32:08
|
1. Yes, using an XML Schema to validate the record, see the "countries" example. Records that do not pass validation will be discarded, and may be written to a file or database table. 2. Yes, using a sx:restrictRecordFilter, a child sx:recordTest element to test the record with an XPATH boolean expression, and a child sx:unmatchedRecord element to handle any discards, which as in (2) may be written to a file or database table. 3. Set the attribute lineDelimited="no" in sx:flatFile. 4. The flat file text formatting options only apply to flat file writers. But you can control the formatting of field values to XML element and attribute values by using any XSLT formatting functions in select expressions in the sx:fieldElementMap and sx:fieldAttributeMap elements, use the select attribute rather than the field attribute. -- Daniel ----- Original Message ----- From: "Mohit Gupta | Daffodil Software Ltd." To: ser...@li... Sent: Friday, August 10, 2007 3:41 AM Subject: [Servingxml-help] Urgent Query - Mandatory/optional field |conditions for flat file Hi, I am using ServingXML to convert some flat file data to XML format. It is a very nice tool. I seek some urgent help for a few points, whether these are achievable using ServingXML or not? Points are: Can we declare any field as mandatory or optional in flat file structure? Can we specify condition for any field like 3rd field in a record should exist only if value of 2nd field is 'male'. I.e. condition in a single record, where existence of one field is dependent on some value in any previous field in same record. While parsing flat file, tool is not ignoring the record delimiters and so new line character is also coming into fixed width counting. What can be the solution for this? PadCharacter, and justify attributes are not working while converting flat file to xml. Is there any solution? In code, LineFormatter is only working with PositionalFieldWriter. Solution for these points is very important for our project. Please help urgently. Regards, -- Mohit Gupta Daffodil Software Ltd | IInd floor, Vipul Orchid Plaza, Sec - 54, Gurgaon Tel: +91-124-414-5800 | Cell: +91-981-007-0148 | Fax: +91-124-414-5801 E-Mail: moh...@da... | Web: www.daffodilsw.com Experience is the only teacher we have. We may talk and reason all our lives, but we shall not understand a word of truth until we experience it ourselves. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Daniel P. <dan...@wi...> - 2007-08-13 04:28:46
|
1. Yes, using an XML Schema to validate the record, see the "countries" = example. Records that do not pass validation will be discarded, and may = be written to a file or database table. 2. Yes, using a sx:restrictRecordFilter, a child sx:recordTest element = to test the record with an XPATH boolean expression, and a child = sx:unmatchedRecord element to handle any discards, which as in (2) may = be written to a file or database table. 3. Set the attribute lineDelimited=3D"no" in sx:flatFile. 4. The flat file text formatting options only apply to flat file = writers. But you can control the formatting of field values to XML = element and attribute values by using any XSLT formatting functions in = select expressions in the sx:fieldElementMap and sx:fieldAttributeMap = elements, use the select attribute rather than the field attribute. -- Daniel ----- Original Message -----=20 From: "Mohit Gupta | Daffodil Software Ltd."=20 To: ser...@li...=20 Sent: Friday, August 10, 2007 3:41 AM Subject: [Servingxml-help] Urgent Query - Mandatory/optional field = |conditions for flat file Hi, I am using ServingXML to convert some flat file data to XML format. It = is a very nice tool. I seek some urgent help for a few points, whether these are achievable = using ServingXML or not? Points are:=20 1.. Can we declare any field as mandatory or optional in flat file = structure?=20 2.. Can we specify condition for any field like=20 1.. 3rd field in a record should exist only if value of 2nd field = is 'male'.=20 2.. I.e. condition in a single record, where existence of one = field is dependent on some value in any previous field in same record. 3.. While parsing flat file, tool is not ignoring the record = delimiters and so new line character is also coming into fixed width = counting. What can be the solution for this?=20 4.. PadCharacter, and justify attributes are not working while = converting flat file to xml. Is there any solution? In code, = LineFormatter is only working with PositionalFieldWriter. Solution for these points is very important for our project. Please = help urgently. Regards, --=20 Mohit Gupta=20 Daffodil Software Ltd | IInd floor, Vipul Orchid Plaza, Sec - 54, = Gurgaon Tel: +91-124-414-5800 | Cell: +91-981-007-0148 | Fax: +91-124-414-5801 = E-Mail: moh...@da... | Web: www.daffodilsw.com=20 Experience is the only teacher we have. We may talk and reason all our = lives, but we shall not understand a word of truth until we experience = it ourselves. -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a = browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Daniel P. <dan...@wi...> - 2007-08-13 04:08:52
|
----- Original Message -----=20 From: "Mohit Gupta | Daffodil Software Ltd."=20 To: ser...@li...=20 Sent: Friday, August 10, 2007 3:41 AM Subject: [Servingxml-help] Urgent Query - Mandatory/optional field = |conditions for flat file Hi, I am using ServingXML to convert some flat file data to XML format. It = is a very nice tool. I seek some urgent help for a few points, whether these are achievable = using ServingXML or not? Points are:=20 1.. Can we declare any field as mandatory or optional in flat file = structure?=20 2.. Can we specify condition for any field like=20 1.. 3rd field in a record should exist only if value of 2nd field = is 'male'.=20 2.. I.e. condition in a single record, where existence of one = field is dependent on some value in any previous field in same record. 3.. While parsing flat file, tool is not ignoring the record = delimiters and so new line character is also coming into fixed width = counting. What can be the solution for this?=20 4.. PadCharacter, and justify attributes are not working while = converting flat file to xml. Is there any solution? In code, = LineFormatter is only working with PositionalFieldWriter. Solution for these points is very important for our project. Please = help urgently. Regards, --=20 Mohit Gupta=20 Daffodil Software Ltd | IInd floor, Vipul Orchid Plaza, Sec - 54, = Gurgaon Tel: +91-124-414-5800 | Cell: +91-981-007-0148 | Fax: +91-124-414-5801 = E-Mail: moh...@da... | Web: www.daffodilsw.com=20 Experience is the only teacher we have. We may talk and reason all our = lives, but we shall not understand a word of truth until we experience = it ourselves. -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a = browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: \Mohit G. | D. S. Ltd.\ <moh...@da...> - 2007-08-10 07:41:34
|
Hi, I am using ServingXML to convert some flat file data to XML format. It = is a very nice tool. I seek some urgent help for a few points, whether these are achievable = using ServingXML or not? Points are:=20 1.. Can we declare any field as mandatory or optional in flat file = structure? 2.. Can we specify condition for any field like=20 1.. 3rd field in a record should exist only if value of 2nd field is = 'male'. 2.. I.e. condition in a single record, where existence of one field = is dependent on some value in any previous field in same record. 3.. While parsing flat file, tool is not ignoring the record = delimiters and so new line character is also coming into fixed width = counting. What can be the solution for this? 4.. PadCharacter, and justify attributes are not working while = converting flat file to xml. Is there any solution? In code, = LineFormatter is only working with PositionalFieldWriter. Solution for these points is very important for our project. Please help = urgently. Regards, --=20 Mohit Gupta=20 Daffodil Software Ltd | IInd floor, Vipul Orchid Plaza, Sec - 54, = Gurgaon Tel: +91-124-414-5800 | Cell: +91-981-007-0148 | Fax: +91-124-414-5801=20 E-Mail: moh...@da... | Web: www.daffodilsw.com=20 Experience is the only teacher we have. We may talk and reason all our = lives, but we shall not understand a word of truth until we experience = it ourselves. |
From: Ravikumar T. <ra...@gm...> - 2007-05-11 03:56:24
|
yup. That is exactly what we are doing today. On 5/10/07, Daniel Parker <ser...@li...> wrote: > > Sorry for the delayed response. > > Buffering isn't as simple as that. It has to be optional, since some > users are using this tool with very large datasets. Also, note that record > filters can remove some records from a stream, so what was once the previous > record is no longer. > > For now, I would suggest using a custom record filter, do your own > buffering, and modify the current record by adding the fields you need from > previous records. > > Daniel > > ----- Original Message ----- > *From:* Ravikumar Tadysetty <ra...@gm...> > *To:* Daniel Parker <dan...@sy...> > *Sent:* Sunday, May 06, 2007 9:03 PM > *Subject:* Re: [Servingxml-help] Flat file structure validation > > Daniel > > For situations like this one (or more complicated than this), can we do > something like: > > group all records by file number. > Hold all those records in a memory buffer. > Provide a facility to access that memory buffer in the record mapping > section. > eg: > > <group1> > <a> ERecord->[0] </a> > <b> SRecord->[1] </b> > <group1> > <group2> > <c>SRecord->[0]</c> > <d>ERecord->[1]</d> > </group2> > > This way we can access data of any record in that group from any element > of the xml. One of the main constraints today is that servingxml mapping > processes one record at a time. Once that record is processed, it cannot be > accessed further. We donot have the ability to look-ahead or look-behind > while processing a record in a group. > > > On 5/5/07, Ravikumar Tadysetty <ra...@gm...> wrote: > > > > Daniel, Thank you. Really waiting for this. However this was only a part > > of the puzzle. I wanted more flexibility. Please see the below example. I > > added one more field and I cannot achieve this now. Can you suggest > > something for this type of situation. Essentially, while printing <group2> I > > want the data from the previous record. > > > > From the previous example, I added 2 new fields FIELDX, FIELDY. I want > > to put FIELDX from ERecord and FIELD1 from SRecord in <group2>. > > > > FROM > > > > E1001FIELD0FIELDX > > S1001FIELD1FIELD2 > > > > E1002FIELDAFIELDY > > > > S1002FIELDBFIELDC > > > > TO > > > > <ytds> > > <record fileno="1001"> > > <group1> > > <a>FIELD0</a> > > <b>FIELD2</b> > > </group1> > > > > > > <group2> > > <c>FIELD1</c> > > <d>FIELDX</d> > > </group2> > > </record> > > <record fileno="1002"> > > <group1> > > <a>FIELDA</a> > > > > > > <b>FIELDC</b> > > </group1> > > <group2> > > <c>FIELDB</c> > > <d>FIELDY</d> > > </group2> > > </record> > > </ytds> > > > > > > > > On 4/29/07, Daniel Parker <dan...@sy... > wrote: > > > > > > Ravi, > > > > > > This is now supported in version 0.6.6. Refer to the element > > > reference entry for sx:innerGroup, to the last example. > > > > > > -- Daniel > > > > > > ----- Original Message ----- > > > *From:* Ravikumar Tadysetty <ra...@gm...> > > > *To:* Daniel Parker <dan...@sy...> > > > *Sent:* Sunday, March 25, 2007 10:57 PM > > > *Subject:* Re: [Servingxml-help] Flat file structure validation > > > > > > Daniel, > > > > > > sorry for trouble. I am unable to achieve what I wanted to do. I was > > > trying this through the weekend. I am able to achieve only a part of > > > expected output. I am sending my resource script, input file, expected > > > output and actual output. I hope you will help me fix the resource script to > > > get the expected output. I am sending the resource script as attachment. > > > > > > Input - ytds.txt > > > > > > E1002FIELD0 > > > S1002FIELD1FIELD2 > > > > > > ExpectedOutput: > > > > > > <record fileno=1001> > > > <group1> > > > <a>FIELD0</a> > > > <b>FIELD2</b> > > > </group1> > > > <group2> > > > <c>FIELD1</c> > > > </group2> > > > </record> > > > > > > ActualOutput: > > > > > > <record fileno=1001> > > > <group1> > > > <a>FIELD0</a> > > > <b>FIELD2</b> > > > </group1> > > > </record> > > > > > > Regards > > > Ravi > > > > > > On 3/22/07, Daniel Parker <dan...@sy... > wrote: > > > > > > > > Yes, in record mapping sections you can define groupings based on > > > > the previous, current, and next records, check out any of the examples using > > > > sx:innerGroup. The case below is no problem, I may use it in as example in > > > > the element reference. > > > > > > > > Daniel > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > *From:* Ravikumar Tadysetty <ra...@gm...> > > > > *To:* Daniel Parker <dan...@sy...> > > > > *Sent:* Thursday, March 22, 2007 4:06 PM > > > > *Subject:* Re: [Servingxml-help] Flat file structure validation > > > > > > > > Thanks Daniel. This is helpful. > > > > Another question on the same file structure. > > > > > > > > It looks like serving xml processes one record (using onRecord) at a > > > > time. Can I have control over 2 record at a time while converting flat file > > > > to xml. I want to convert the below flat file as follows. Essentially I > > > > want to put one field from E record and one field from S record into > > > > <group1>. So while processing E record, I need information from the next > > > > record also. > > > > > > > > E1001FIELD0 > > > > S1001FIELD1FIELD2 > > > > E1002FIELDA > > > > S1002FIELDBFIELDC > > > > > > > > TO > > > > > > > > <record fileno=1001> > > > > <group1> > > > > <a>FIELD0</a> > > > > <b>FIELD2</b> > > > > </group1> > > > > <group2> > > > > <c>FIELD1</c> > > > > </group2> > > > > </record> > > > > > > > > > > > > > > > > > > > > On 3/12/07, Daniel Parker <dan...@sy...> wrote: > > > > > > > > > > Hello Ravi, > > > > > > > > > > I think you'd have to transform the flat file to XML and express > > > > > the rules in an XML Schema, using the msv:schemaValidator (previously > > > > > msv:msvFilter) to validate the XML. Alternatively, you could write a custom > > > > > record filter in Java, and buffer enough records until you could determine > > > > > whether they were valid, and discard them or throw an exception if you find > > > > > an error. But other than that, the tool doesn't provide anything special > > > > > for validating groups of records, as opposed to individual records. > > > > > > > > > > Best regards, > > > > > Daniel > > > > > > > > > > ----- Original Message ----- > > > > > *From:* Ravikumar Tadysetty <ra...@gm...> > > > > > *To:* ser...@li... > > > > > *Sent:* Friday, March 09, 2007 12:16 AM > > > > > *Subject:* [Servingxml-help] Flat file structure validation > > > > > > > > > > Hi > > > > > > > > > > I am trying to use servingxml to validate and transform flat files > > > > > to xml. I am wondering if this toolkit can help validate the flat file which > > > > > looks as follows: > > > > > > > > > > Every row is a record with position #1 as record type. Position > > > > > #2-5 as filenumber and the rest as misc fields. I want to validate that for > > > > > every filenumber, there exists atleast 1 E record followed by 0 or more S > > > > > records. > > > > > > > > > > E1001FIELD0 > > > > > S1001FIELD1FIELD2 > > > > > S1001FIELD3FIELD4 > > > > > E1002FIELDA > > > > > S1002FIELDBFIELDC > > > > > > > > > > Thanks > > > > > Ravi > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > Take Surveys. Earn Cash. Influence the Future of IT > > > > > Join SourceForge.net's Techsay panel and you'll get the chance to > > > > > share your > > > > > opinions on IT & business topics through brief surveys-and earn > > > > > cash > > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > _______________________________________________ > > > > > Servingxml-help mailing list > > > > > Ser...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/servingxml-help > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > Take Surveys. Earn Cash. Influence the Future of IT > > > > Join SourceForge.net's Techsay panel and you'll get the chance to > > > > share your > > > > opinions on IT & business topics through brief surveys-and earn cash > > > > > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > _______________________________________________ > > > > Servingxml-help mailing list > > > > Ser...@li... > > > > https://lists.sourceforge.net/lists/listinfo/servingxml-help > > > > > > > > > > > > > > |
From: Daniel P. <dan...@sy...> - 2007-05-08 02:22:14
|
Actually, the proposed solution is fine, except that it illustrates the = dangers of cut and paste, and search and replace. Anyway, I've added = the corrected example to the on-line examples, see the XML-to-Flat = "Formating Distinct Record Lines" example. I'll have a look at the other case later in the week. Regards, Daniel Parker=20 ----- Original Message -----=20 From: Daniel Parker=20 To: Jos=C3=A9 Santos ; ser...@li...=20 Sent: Tuesday, May 01, 2007 7:13 AM Subject: Re: [Servingxml-help] Formating distinct record lines Sorry, there appears to be an issue with the proposed solution, I'll = need to investigate (I hadn't previously tested this case.) Daniel ----- Original Message -----=20 From: Daniel Parker=20 To: Jos=C3=A9 Santos ; ser...@li...=20 Sent: Monday, April 30, 2007 11:46 PM Subject: Re: [Servingxml-help] Formating distinct record lines Jose, The first example is no problem, you can use a resources script as = shown below. Note that the sx:when tests in the output record = definition are evaluated against the XML representation of the flattened = records. Since there's no obvious tag field, the test is performed = against the record type that is assigned to the record in the inverse = record mapping section, where the record type corresponds to the root = element of the record's XML representation. =20 <sx:resources xmlns:sx=3D"http://www.servingxml.com/core"> <sx:service id=3D"blocks"> <sx:recordStream> <sx:xmlRecordReader> <sx:transform> <sx:document/> </sx:transform> <sx:inverseRecordMapping ref=3D"blocksToFileMapping"/> </sx:xmlRecordReader> <sx:flatFileWriter> <sx:flatFile> <sx:flatFileBody> <sx:flatRecordType ref=3D"blockType"/> </sx:flatFileBody> </sx:flatFile> </sx:flatFileWriter> </sx:recordStream> </sx:service> <sx:flatRecordTypeChoice id=3D"blockType" name=3D"blockType"> <sx:positionalField name=3D"dummy" width=3D"1"/> <sx:when test=3D"/Block1Record"> <sx:flatRecordType name=3D"BLOCK1"> <sx:positionalField name=3D"Field1" width=3D"4"/> <sx:positionalField name=3D"Field2" width=3D"4"/> <sx:positionalField name=3D"Field3" width=3D"4"/> <sx:positionalField name=3D"Field4" width=3D"4"/> </sx:flatRecordType> </sx:when> <sx:when test=3D"/Block2Record"> <sx:flatRecordType name=3D"BLOCK2"> <sx:positionalField name=3D"Text1" width=3D"4"/> <sx:positionalField name=3D"Text2" width=3D"4"/> <sx:positionalField name=3D"Text3" width=3D"4"/> <sx:positionalField name=3D"Text4" width=3D"4"/> </sx:flatRecordType> </sx:when> <sx:when test=3D"/Block3Record"> <sx:flatRecordType name=3D"BLOCK3"> <sx:positionalField name=3D"Integer1" width=3D"4"/> <sx:positionalField name=3D"Integer2" width=3D"4"/> <sx:positionalField name=3D"Integer3" width=3D"4"/> </sx:flatRecordType> </sx:when> </sx:flatRecordTypeChoice> <sx:inverseRecordMapping id=3D"blocksToFileMapping"> <sx:onSubtree path=3D"/BLOCKS"> <sx:onSubtree path=3D"BLOCK1"> <sx:subtreeRecordMap recordType=3D"Block1Record"> <sx:subtreeFieldMap select=3D"FIELD1" field=3D"Field1"/> <sx:subtreeFieldMap select=3D"FIELD2" field=3D"Field2"/> <sx:subtreeFieldMap select=3D"FIELD3" field=3D"Field3"/> <sx:subtreeFieldMap select=3D"FIELD4" field=3D"Field4"/> </sx:subtreeRecordMap> </sx:onSubtree> <sx:onSubtree path=3D"BLOCK2"> <sx:subtreeRecordMap recordType=3D"Block2Record"> <sx:subtreeTextMap select=3D"TEXT1" field=3D"Text1"/> <sx:subtreeTextMap select=3D"TEXT2" field=3D"Text2"/> <sx:subtreeTextMap select=3D"TEXT3" field=3D"Text3"/> <sx:subtreeTextMap select=3D"TEXT4" field=3D"Text4"/> </sx:subtreeRecordMap> </sx:onSubtree> <sx:onSubtree path=3D"BLOCK3"> <sx:subtreeRecordMap recordType=3D"Block3Record"> <sx:subtreeIntegerMap select=3D"INTEGER1" = field=3D"Integer1"/> <sx:subtreeIntegerMap select=3D"INTEGER2" = field=3D"Integer2"/> <sx:subtreeIntegerMap select=3D"INTEGER3" = field=3D"Integer3"/> </sx:subtreeRecordMap> </sx:onSubtree> </sx:onSubtree> </sx:inverseRecordMapping> </sx:resources> I'll have to think about the second example, it may require an = enhancement. Regards, Daniel Parker ----- Original Message -----=20 From: Jos=C3=A9 Santos=20 To: ser...@li...=20 Sent: Monday, April 30, 2007 3:07 AM Subject: [Servingxml-help] Formating distinct record lines Hi, I am trying to use servingxml to transform xml files to flat = files, but I am having some problems solving some things like for = instance, my XML file has lots off different tags and I need to treat = than separately ( but not as a header) for istance:=20 <BLOCK1> <FIELD1>XXXX</FIELD1> <FIELD2>YYYY</FIELD2> <FIELD3>ZZZZ</FIELD3> <FIELD4>WWWW</FIELD4> </BLOCK1> <BLOCK2> <TEXT1>XXXX</TEXT1> <TEXT2>YYYY</TEXT2> <TEXT3>ZZZZ</TEXT3> <TEXT4>WWWW</TEXT4> </BLOCK2> <BLOCK3> <INTEGER1>1111</INTEGER1> <INTEGER2>2222</INTEGER2> <INTEGER2>3333</INTEGER2> </BLOCK4> I would like to have distinct record types for each block, and its = corresponding record mapping. Is this possible, for the same file? Another problem is that I need to correspond each level of a = hierarchy of tags to a record line in the output flat file, as an = example this XML entry: <Block270> <Field1>some text</Field1> <Field2>666666</Field2> <Block700> <Field3>something</Field3> <Field4>999999</Field4> <Block700> <Block800> <Field5>last</Field6> <Field6>007</Field6> <Block800> </Block270> <Block270> <Field1>some text2</Field1> <Field2>111111</Field2> <Block700> <Field3>something2</Field3> <Field4>888888</Field4> <Block700> <Block800> <Field5>last2</Field6> <Field6>008</Field6> <Block800> </Block270> And the desired output would be: some text666666 something999999 last007 some text2111111 something2888888 last2008 Is this possible, to do? If its not what source files should I change, to make this work. Thanks for your time, Jos=C3=A9 Santos -------------------------------------------------------------------------= - = -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/=20 -------------------------------------------------------------------------= - _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help -------------------------------------------------------------------------= --- = -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/=20 -------------------------------------------------------------------------= --- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |