servingxml-help Mailing List for ServingXML (Page 11)
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: Sandhya <sa...@la...> - 2007-04-01 04:14:37
|
Thanks. And how about ServingXML spitting DOM instead of XML? On Sun, Apr 1, 2007 at 12:01 AM, Daniel Parker wrote: > You can use a separate RecordBuilder to build each group as its own > record (RecordBuilders can be reused if you call the clear method > before building a new record.) Then create an array with the records > as entries, and set a field with a name and the array of group records > (segments), i.e. > > RecordBuilder mainRecordBuilder = new > RecordBuilder(recordTypeName); > Name myRepeatingGroup = new QualifiedName("myRepeatingGroup"); > Record[] segments; > > mainRecordBuilder.setField(myRepeatingGroup, segments); > ... other assignments ... > Record record = recordBuilder.toRecord(); > > If you need to access the segments in Java code, from the record, you > can do so as follows: > > Value value = record.getValue(myRepeatingGroup); > Record[] segments = value.getSegments(); > > Also, refer to the javadoc for RecordBuilder, Record, and Value. > > -- Daniel > > ----- Original Message ----- From: "Sandhya" <sa...@la...> > To: <dan...@sy...> > Sent: Saturday, March 31, 2007 5:24 PM > Subject: RecordBuilder > > >> Daniel >> >> How can I create a new record using RecordBuilder for the following >> type >> of record. It has repeatingGroups. >> >> NAME1=VALUE1|NAME2=VALUE2|NAME2=VALUE3 >> >> >> On a separate note, can servingxml spit out DOM nodes in memory >> instead >> of XML to an output stream. I want to pass these DOM nodes to another >> business component as input. >> >> Regards >> Sandhya >> > > -- Sent using Laszlo Mail. Try it yourself. http://www.laszlomail.com |
From: Daniel P. <dan...@sy...> - 2007-03-31 16:11:04
|
Name myParam = new QualifiedName("customparams"); String value = parameters.getString(myParam); ----- Original Message ----- From: "Sandhya" <sa...@la...> To: <ser...@li...> Sent: Friday, March 30, 2007 11:09 PM Subject: [Servingxml-help] params.. > Hi, I have a parameter in my sx:service tag. I want an xml string as a > param. > So I am using a CDATA section. I want access to this param in my > RecordFilter's writeRecord(..) method. How can I access this value > there. > > Or If I have to access this custom params just after the resource script > is parsed, how can I modify the consoleApp program to access this. > > <sx:parameter name="customparams"> > <sx:defaultValue> > <CDATA> > <customparams> > <param recordtype="TYPE1" maxlen="100"> > <param recordtype="TYPE2" maxlen="102"> > ... > </custormparams> > </CDATA> > </sx:defaultValue> > </sx:parameter> > > > Regards > Sandhya > > > ------------------------------------------------------------------------- > 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: Sandhya <sa...@la...> - 2007-03-31 03:09:33
|
Hi, I have a parameter in my sx:service tag. I want an xml string as a param. So I am using a CDATA section. I want access to this param in my RecordFilter's writeRecord(..) method. How can I access this value there. Or If I have to access this custom params just after the resource script is parsed, how can I modify the consoleApp program to access this. <sx:parameter name="customparams"> <sx:defaultValue> <CDATA> <customparams> <param recordtype="TYPE1" maxlen="100"> <param recordtype="TYPE2" maxlen="102"> ... </custormparams> </CDATA> </sx:defaultValue> </sx:parameter> Regards Sandhya |
From: Daniel P. <dan...@sy...> - 2007-03-29 01:01:18
|
You can override the endRecordStream method of RecordFilter to be = notified of when the last record is received. Just call = super.endRecordStream before returning from your method. Your other question is really a Java question, but you can use = java.io.ByteArrayOutputStream in much the same way as you were thinking = about using a StringWriter. Daniel ----- Original Message -----=20 From: Ravikumar Tadysetty=20 To: ser...@li...=20 Sent: Wednesday, March 28, 2007 8:49 PM Subject: [Servingxml-help] Writing to a buffer Hi I am converting a large flat file to xml using servingXml. I am trying = to write the xml to a buffer instead of a physical file. After certain = number of lines/records are transformed to xml, I am planning to invoke = a listener or trigger which would consume/process the xml generated so = far and return control so that the next set of records are converted. I = am considering the following approach:=20 Write a record filter and maintain a count of records. After the = desired number of records are written, I notify a listener which can = process the xml produced so far. I see an issue with this. The = writeRecord method doesnot tell me if I am at the end of the file. So I = wouldnot know when to fire the listener for the last set of records. = Please let me know if this approach can be followed.=20 Regarding writing to a buffer, I would like to use a = java.io.StringWriter so that I can read from it. But = OutputStreamSinkAdaptor doesnot take a java.io.Writer as a parameter to = the constructor. It would only take an OutputStream. Is there any other = way I can write to a buffer which can also be read and cleared while the = xml transformation is in progress.=20 Regards 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Ravikumar T. <ra...@gm...> - 2007-03-29 00:49:18
|
Hi I am converting a large flat file to xml using servingXml. I am trying to write the xml to a buffer instead of a physical file. After certain number of lines/records are transformed to xml, I am planning to invoke a listener or trigger which would consume/process the xml generated so far and return control so that the next set of records are converted. I am considering the following approach: Write a record filter and maintain a count of records. After the desired number of records are written, I notify a listener which can process the xml produced so far. I see an issue with this. The writeRecord method doesnot tell me if I am at the end of the file. So I wouldnot know when to fire the listener for the last set of records. Please let me know if this approach can be followed. Regarding writing to a buffer, I would like to use a java.io.StringWriter so that I can read from it. But OutputStreamSinkAdaptor doesnot take a java.io.Writer as a parameter to the constructor. It would only take an OutputStream. Is there any other way I can write to a buffer which can also be read and cleared while the xml transformation is in progress. Regards Ravi |
From: Daniel P. <dan...@sy...> - 2007-03-28 02:42:58
|
This isn't currently supported, although it could easily be added.=20 The problem is that you have two groups, and the second one immediately = follows the first one - its first record is the first one's last record. = Currently, the two groups must belong to a sx:recordChoice, so any = given record can belong to only one group at the same level. However, = since the first group is finished before the second group begins, I = believe it's possible to relax the constraints to allow this. =20 Because grouping is streaming, the records aren't buffered, care has to = be taken not to start a second group before the first one ends, or the = output tags will be scrambled. That was the reason for restricting one = record to only one group at the same level, to prevent surprises, but it = looks like this restriction is too strong. I'll have a look at it. Daniel ----- Original Message -----=20 From: Ravikumar Tadysetty=20 To: Daniel Parker=20 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.=20 Input - ytds.txt E1002FIELD0 S1002FIELD1FIELD2 ExpectedOutput: <record fileno=3D1001> <group1> <a>FIELD0</a>=20 <b>FIELD2</b> </group1> <group2> <c>FIELD1</c> </group2> </record> ActualOutput: <record fileno=3D1001> <group1> <a>FIELD0</a>=20 <b>FIELD2</b> </group1> </record> Regards Ravi On 3/22/07, Daniel Parker <dan...@sy... > wrote:=20 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. =20 Daniel ----- Original Message -----=20 From: Ravikumar Tadysetty=20 To: Daniel Parker=20 Sent: Thursday, March 22, 2007 4:06 PM Subject: Re: [Servingxml-help] Flat file structure validation Thanks Daniel. This is helpful.=20 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.=20 E1001FIELD0 S1001FIELD1FIELD2 E1002FIELDA S1002FIELDBFIELDC TO <record fileno=3D1001> <group1> <a>FIELD0</a>=20 <b>FIELD2</b> </group1> <group2> <c>FIELD1</c> </group2> </record> On 3/12/07, Daniel Parker <dan...@sy...> wrote:=20 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 -----=20 From: Ravikumar Tadysetty=20 To: ser...@li...=20 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.=20 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV=20 ---------------------------------------------------------------------- _______________________________________________ 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=20 opinions on IT & business topics through brief surveys-and earn cash = http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help=20 |
From: Daniel P. <dan...@sy...> - 2007-03-28 01:25:38
|
Write it like this (without the field attribute) <sx:fieldElementMap element=3D"SomeField">=20 <sx:replace searchFor=3D"^0*" replaceWith =3D""> <sx:toString value=3D"{SomeField}"/> </sx:replace> </sx:fieldElementMap> The field attribute takes precedence over the content, and specifies a = mapping from the field to the element. Daniel ----- Original Message -----=20 From: Ravikumar Tadysetty=20 To: ser...@li...=20 Sent: Tuesday, March 27, 2007 6:10 PM Subject: [Servingxml-help] <sx:replace> Hi I am trying to use <sx:replace> within <sx:fieldElementMap>. But it = doesnot seem to be evaluated. However it does work within = <sx:elementMap>. Please let me know if this is expected behavior or if = there is a workaround.=20 The following removes the leading zeros: <sx:elementMap element=3D"somefield"> <sx:replace searchFor=3D"^0*" replaceWith =3D""> <sx:toString value=3D"{somefield}"/>=20 </sx:replace> </sx:elementMap> The following is not removing the leading zeros: <sx:fieldElementMap field=3D"somefield" element=3D"SomeField">=20 <sx:replace searchFor=3D"^0*" replaceWith =3D""> <sx:toString value=3D"{SomeField}"/> </sx:replace> </sx:elementMap> 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Ravikumar T. <ra...@gm...> - 2007-03-27 22:10:26
|
Hi I am trying to use <sx:replace> within <sx:fieldElementMap>. But it doesnot seem to be evaluated. However it does work within <sx:elementMap>. Please let me know if this is expected behavior or if there is a workaround. The following removes the leading zeros: <sx:elementMap element="somefield"> <sx:replace searchFor="^0*" replaceWith =""> <sx:toString value="{somefield}"/> </sx:replace> </sx:elementMap> The following is not removing the leading zeros: <sx:fieldElementMap field="somefield" element="SomeField"> <sx:replace searchFor="^0*" replaceWith =""> <sx:toString value="{SomeField}"/> </sx:replace> </sx:elementMap> Thanks Ravi |
From: Daniel P. <dan...@sy...> - 2007-03-23 02:35:22
|
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. =20 Daniel ----- Original Message -----=20 From: Ravikumar Tadysetty=20 To: Daniel Parker=20 Sent: Thursday, March 22, 2007 4:06 PM Subject: Re: [Servingxml-help] Flat file structure validation Thanks Daniel. This is helpful.=20 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.=20 E1001FIELD0 S1001FIELD1FIELD2 E1002FIELDA S1002FIELDBFIELDC TO <record fileno=3D1001> <group1> <a>FIELD0</a>=20 <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 -----=20 From: Ravikumar Tadysetty=20 To: ser...@li...=20 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.=20 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV=20 -------------------------------------------------------------------------= - _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Daniel P. <dan...@sy...> - 2007-03-23 01:55:06
|
Ravi, Picking up the count from the field value isn't supported in the current = version, but somebody else needs this as well, so it should get added = fairly quickly. =20 Daniel ----- Original Message -----=20 From: Ravikumar Tadysetty=20 To: ser...@li...=20 Sent: Thursday, March 22, 2007 5:51 PM Subject: [Servingxml-help] count on the repeating group Hi I have a positional record with a repeating group of elements. But the = count is variable. eg 005CODE1CODE2CODE3CODE4CODE5JUNK1JUNK2 Expected output: <codes count=3D5> <code>CODE1</code>=20 <code>CODE2</code> <code>CODE3</code> <code>CODE4</code> <code>CODE5</code> </codes> The first 3 letters of the line determine the # of Codes available in = the rest of the list. After CODE5, the rest of the line should be = ignored. The count attribute on the <sx:repeatingGroup> element in ServingXML = is fixed. Is it possible to take value of another positional field in = the count attribute. Or any other alternatives?=20 Regards 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Ravikumar T. <ra...@gm...> - 2007-03-22 21:51:34
|
Hi I have a positional record with a repeating group of elements. But the count is variable. eg 005CODE1CODE2CODE3CODE4CODE5JUNK1JUNK2 Expected output: <codes count=5> <code>CODE1</code> <code>CODE2</code> <code>CODE3</code> <code>CODE4</code> <code>CODE5</code> </codes> The first 3 letters of the line determine the # of Codes available in the rest of the list. After CODE5, the rest of the line should be ignored. The count attribute on the <sx:repeatingGroup> element in ServingXML is fixed. Is it possible to take value of another positional field in the count attribute. Or any other alternatives? Regards Ravi |
From: Daniel P. <dan...@sy...> - 2007-03-16 01:43:32
|
Hello Saurav, I can reproduce your error - by removing saxon.jar from the classpath. = I'm pretty sure you're picking up the default xalan XSLT transformer = that comes with Java 1.5, which has issues, and which is causing this = problem. If you configure your app to use saxon.jar (have it in the = classpath and load the configuration.xml file just like the consoleapp), = or if you add recent versions of xalan or saxon to a directory called = endorsed under your JRE lib directory (see the Getting Started link), = I'm confident that this will work. Best regards, Daniel ----- Original Message -----=20 From: Saurav Suman=20 To: ser...@li...=20 Sent: Thursday, March 15, 2007 9:34 AM Subject: [Servingxml-help] dear all help needed on this..the java code = doesnot compile with jre1.5 swath.xml hiresources-swath2pipe.xml com.servingxml.util.ServingXmlException: Error in element = sx:subtreeRecordMap. Transform failed.. Could not compile stylesheet at = com.servingxml.ioc.ResourceContainerImpl.load(ResourceContainerImpl.java:= 133) at com.servingxml.app.AppDriver.startup(AppDriver.java:131) at com.servingxml.app.AppDriver.startup(AppDriver.java:101) at com.servingxml.app.AppDriver.startup(AppDriver.java:55) at XmlToFlat.startup(XmlToFlat.java:52) at XmlToFlat.doTransform2(XmlToFlat.java:101) at XmlToFlat.main(XmlToFlat.java:74) swath java.lang.NullPointerException at = com.servingxml.app.DefaultServiceContext.<init>(DefaultServiceContext.jav= a:64) at XmlToFlat.doTransform2(XmlToFlat.java:114) at XmlToFlat.main(XmlToFlat.java:74) ***The information transmitted is intended only for the person or = entity to which it is addressed and may contain confidential and/or = privileged material. Any review,retransmission,dissemination or other = use of, or taking of any action in reliance upon, this information by = persons or entities other than the intended recipient is prohibited. If = you received this in error, please contact the sender and delete the = material from any computer.***=20 -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Daniel P. <dan...@sy...> - 2007-03-13 01:29:26
|
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 -----=20 From: Ravikumar Tadysetty=20 To: ser...@li...=20 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.=20 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Ravikumar T. <ra...@gm...> - 2007-03-09 04:16:58
|
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 |
From: <jlf...@gm...> - 2007-01-05 12:44:01
|
Hello again, I have already found the solution, I have to include the following within <sx:serialize> tags, ... <sx:xsltSerializer> <sx:outputProperty name=3D"indent" value=3D"yes"/> <sx:outputProperty name=3D"encoding" value=3D"ISO-8859-1"/> </sx:xsltSerializer> .... Thank you very much, "servingxml" is a really good tool... ---------- Forwarded message ---------- From: Jose Luis Florido D=EDaz <jlf...@gm...> Date: 05-ene-2007 12:25 Subject: Flat2XML - XML encoding iso-8859-1 instead of utf-8 To: ser...@li... Hello, I am a new developer in servingxml and I have found the following problem. I have processed a flat file with fixed data columns and two sections groups. It has been very easy to produced the xml output file with my xsd specifications following the documentation that servingxml provides. But I have problems related to validation of the resulting xml file because it contains =D1 characters. The default encoding output of servingxml is utf-8= , so that... how can I change this encoding default charset of output xml?? I tried to include the following in "servingxml.xml" but it does not work, <sx:xsltConfiguration version=3D"2.0"> ... <sx:systemProperty name=3D"encoding" value=3D"iso-8859-1"/> ... </sx:xsltConfiguration> Any help would be greatly appreciated, thank you very much. |
From: <jlf...@gm...> - 2007-01-05 11:25:23
|
Hello, I am a new developer in servingxml and I have found the following problem. I have processed a flat file with fixed data columns and two sections groups. It has been very easy to produced the xml output file with my xsd specifications following the documentation that servingxml provides. But I have problems related to validation of the resulting xml file because it contains =D1 characters. The default encoding output of servingxml is utf-8= , so that... how can I change this encoding default charset of output xml?? I tried to include the following in "servingxml.xml" but it does not work, <sx:xsltConfiguration version=3D"2.0"> ... <sx:systemProperty name=3D"encoding" value=3D"iso-8859-1"/> ... </sx:xsltConfiguration> Any help would be greatly appreciated, thank you very much. |
From: Daniel P. <dan...@sy...> - 2006-12-14 02:30:08
|
Harold, The error message is correct, the XML is invalid. Element names cannot = start with numbers. Change 1,2,3... to a,b,c... and it will work. Regards, Daniel Parker ----- Original Message -----=20 From: Harold Flores=20 To: ser...@li...=20 Sent: Wednesday, December 13, 2006 2:43 PM Subject: [Servingxml-help] Xml to flat error Hello, I am trying to use the conversion from an Xml Document into a CVS flat = file. I am getting an error that I am not sure where it comes from. It = is related to a well-formed character or markup, but the Xml document I = am using is well formed. I am attaching the xml file, serving xml = resource and error message. Thanks in advance guys for any help in this = matter.=20 <?xml version=3D"1.0" encoding=3D"utf-8"?> <sx:resources xmlns:sx=3D"http://www.servingxml.com/core"> <sx:service id=3D"fromXmlToESGFile" >=20 <sx:recordStream> <sx:xmlRecordReader> <sx:inverseRecordMapping ref=3D"ESG_USG_V10_FileMapping" /> <sx:transform> <sx:document /> </sx:transform> </sx:xmlRecordReader>=20 <sx:flatFileWriter> <sx:flatFile ref=3D"ESG_USG_V10_File" /> </sx:flatFileWriter> </sx:recordStream> </sx:service> <sx:flatFile id=3D"ESG_USG_V10_File" >=20 <sx:flatFileBody> <sx:flatRecordType ref=3D"DocumentInfoType" /> </sx:flatFileBody> </sx:flatFile> <sx:flatRecordType id=3D"DocumentInfoType" name=3D"DocumentInfoType" > = <sx:fieldDelimiter value=3D"," /> <sx:delimitedField name=3D"RecordIndicator"/> <sx:delimitedField name=3D"DocumentId" /> <sx:delimitedField name=3D"DocumentDate" />=20 <sx:delimitedField name=3D"DocumentTime" /> <sx:delimitedField name=3D"OriginatorDUNS" /> <sx:delimitedField name=3D"OriginatorName" /> <sx:delimitedField name=3D"RecipientDUNS" />=20 <sx:delimitedField name=3D"RecipientName" /> <sx:delimitedField name=3D"VersionNumber" /> <sx:delimitedField name=3D"ExternalDocumentId" /> <sx:delimitedField name=3D"PriorityCode" />=20 <sx:delimitedField name=3D"RecordType" /> </sx:flatRecordType> <sx:inverseRecordMapping id=3D"ESG_USG_V10_FileMapping" > <sx:onSubtree path=3D"/ESG_USG_V10/DocumentInfo" >=20 <sx:subtreeRecordMap recordType=3D"DocumentInfo" > <sx:subtreeFieldMap select=3D"1" field=3D"RecordIndicator" /> <sx:subtreeFieldMap select=3D"2" field=3D"DocumentId" />=20 <sx:subtreeFieldMap select=3D"3" field=3D"DocumentDate" /> <sx:subtreeFieldMap select=3D"4" field=3D"DocumentTime" /> <sx:subtreeFieldMap select=3D"5" field=3D"OriginatorDUNS" />=20 <sx:subtreeFieldMap select=3D"6" field=3D"OriginatorName" /> <sx:subtreeFieldMap select=3D"7" field=3D"RecipientDUNS" /> <sx:subtreeFieldMap select=3D"8" field=3D"RecipientName" />=20 <sx:subtreeFieldMap select=3D"9" field=3D"VersionNumber" /><!-- <sx:subtreeFieldMap select=3D"10" field=3D"ExternalDocumentId" /> <sx:subtreeFieldMap select=3D"11" field=3D"PriorityCode" />=20 <sx:subtreeFieldMap select=3D"12" field=3D"RecordType" /> --></sx:subtreeRecordMap> </sx:onSubtree> </sx:inverseRecordMapping> </sx:resources> Source: = <ESG_USG_V10><DocumentInfo><1>H</1><2>2006081205230112006933519</2><3>019= 29300</3><4>05:23:01:12</4><5>006933519</5><6>AMEREN = IP</6><7>999999999</7><8>SAMPLE MARKETER</8><9> = 1.0</9><10/><11/><12/></DocumentInfo></ESG_USG_V10> Error: [Fatal Error] com.servingxml.io.cache.DefaultKey3:1:29: The content of = elements must consist of well-formed character data or markup. =20 com.servingxml.util.ServingXmlException : The content of elements must consist of well-formed character data = or markup.=20 at com.servingxml.components.xmlpipeline.MainPipeline.execute( MainPipeline.java:118)=20 at = com.servingxml.components.inverserecordmapping.XmlRecordReader.readRecord= s( XmlRecordReader.java:94)=20 at com.servingxml.components.recordio.DefaultRecordPipeline.execute( DefaultRecordPipeline.java:87)=20 at com.servingxml.components.recordio.RecordStreamBuilder.execute( RecordStreamBuilder.java:75)=20 at com.servingxml.components.service.ServiceImpl.execute( ServiceImpl.java:61)=20 at = com.bluestarenergy.edi.service.common.RecordTransformerServiceImpl.transf= ormRecord( RecordTransformerServiceImpl.java:83 )=20 at = com.bluestarenergy.edi.component.usage.ECInfoUsageFileReader.readFile( ECInfoUsageFileReader.java:43)=20 at sun.reflect.NativeMethodAccessorImpl.invoke0( Native Method)=20 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.mule.model.DynamicEntryPoint.invokeCurrent( DynamicEntryPoint.java:260)=20 at org.mule.model.DynamicEntryPoint.invoke( DynamicEntryPoint.java:171)=20 at org.mule.impl.DefaultLifecycleAdapter.intercept( DefaultLifecycleAdapter.java:202)=20 at org.mule.impl.InterceptorsInvoker.execute( InterceptorsInvoker.java:51)=20 at org.mule.interceptors.InterceptorStack$Invoc.execute( InterceptorStack.java:73)=20 at org.mule.interceptors.TimerInterceptor.intercept( TimerInterceptor.java:42)=20 at org.mule.interceptors.InterceptorStack$Invoc.execute( InterceptorStack.java:68)=20 at org.mule.interceptors.EnvelopeInterceptor.intercept( EnvelopeInterceptor.java:44)=20 at org.mule.interceptors.InterceptorStack$Invoc.execute( InterceptorStack.java:68)=20 at org.mule.interceptors.InterceptorStack.intercept( InterceptorStack.java:48)=20 at org.mule.impl.InterceptorsInvoker.execute( InterceptorsInvoker.java:51)=20 at org.mule.impl.model.DefaultMuleProxy.onCall( DefaultMuleProxy.java:258)=20 at org.mule.impl.model.seda.SedaComponent.doSend( SedaComponent.java:328)=20 at org.mule.impl.model.AbstractComponent.sendEvent( AbstractComponent.java:415)=20 at org.mule.impl.MuleSession.sendEvent( MuleSession.java:352)=20 at org.mule.routing.inbound.InboundMessageRouter.send( InboundMessageRouter.java:181)=20 at org.mule.routing.inbound.InboundMessageRouter.route( InboundMessageRouter.java:147)=20 at = org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener= .onMessage( AbstractMessageReceiver.java:559 )=20 at org.mule.providers.AbstractMessageReceiver.routeMessage( AbstractMessageReceiver.java:305)=20 at org.mule.providers.AbstractMessageReceiver.routeMessage( AbstractMessageReceiver.java:244)=20 at org.mule.providers.file.FileMessageReceiver.processFile( FileMessageReceiver.java:198)=20 at org.mule.providers.file.FileMessageReceiver.poll( FileMessageReceiver.java:106)=20 at org.mule.providers.PollingMessageReceiver.run( PollingMessageReceiver.java:71)=20 at org.mule.impl.work.WorkerContext.run( WorkerContext.java:317)=20 at = edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.= runTask( ThreadPoolExecutor.java:650)=20 at = edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.= run( ThreadPoolExecutor.java:675)=20 at java.lang.Thread.run(Unknown Source) -------------------- The content of elements must consist of well-formed character data or = markup. =20 org.xml.sax.SAXParseException : The content of elements must consist of well-formed character data = or markup.=20 at org.apache.xerces.parsers.AbstractSAXParser.parse( AbstractSAXParser.java:1183)=20 at com.servingxml.io.saxsource.StreamXmlReaderAdaptor.parse( StreamXmlReaderAdaptor.java:119)=20 at com.servingxml.components.xmlpipeline.MainPipeline.execute( MainPipeline.java:109)=20 at = com.servingxml.components.inverserecordmapping.XmlRecordReader.readRecord= s( XmlRecordReader.java:94)=20 at com.servingxml.components.recordio.DefaultRecordPipeline.execute( DefaultRecordPipeline.java:87)=20 at com.servingxml.components.recordio.RecordStreamBuilder.execute( RecordStreamBuilder.java:75)=20 at com.servingxml.components.service.ServiceImpl.execute( ServiceImpl.java:61)=20 at = com.bluestarenergy.edi.service.common.RecordTransformerServiceImpl.transf= ormRecord( RecordTransformerServiceImpl.java:83 )=20 at = com.bluestarenergy.edi.component.usage.ECInfoUsageFileReader.readFile( ECInfoUsageFileReader.java:43)=20 at sun.reflect.NativeMethodAccessorImpl.invoke0( Native Method)=20 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.mule.model.DynamicEntryPoint.invokeCurrent( DynamicEntryPoint.java:260)=20 at org.mule.model.DynamicEntryPoint.invoke( DynamicEntryPoint.java:171)=20 at org.mule.impl.DefaultLifecycleAdapter.intercept( DefaultLifecycleAdapter.java:202)=20 at org.mule.impl.InterceptorsInvoker.execute( InterceptorsInvoker.java:51)=20 at org.mule.interceptors.InterceptorStack$Invoc.execute( InterceptorStack.java:73)=20 at org.mule.interceptors.TimerInterceptor.intercept( TimerInterceptor.java:42)=20 at org.mule.interceptors.InterceptorStack$Invoc.execute( InterceptorStack.java:68)=20 at org.mule.interceptors.EnvelopeInterceptor.intercept( EnvelopeInterceptor.java:44)=20 at org.mule.interceptors.InterceptorStack$Invoc.execute( InterceptorStack.java:68)=20 at org.mule.interceptors.InterceptorStack.intercept( InterceptorStack.java:48)=20 at org.mule.impl.InterceptorsInvoker.execute( InterceptorsInvoker.java:51)=20 at org.mule.impl.model.DefaultMuleProxy.onCall( DefaultMuleProxy.java:258)=20 at org.mule.impl.model.seda.SedaComponent.doSend( SedaComponent.java:328)=20 at org.mule.impl.model.AbstractComponent.sendEvent( AbstractComponent.java:415)=20 at org.mule.impl.MuleSession.sendEvent( MuleSession.java:352)=20 at org.mule.routing.inbound.InboundMessageRouter.send( InboundMessageRouter.java:181)=20 at org.mule.routing.inbound.InboundMessageRouter.route( InboundMessageRouter.java:147)=20 at = org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener= .onMessage( AbstractMessageReceiver.java:559 )=20 at org.mule.providers.AbstractMessageReceiver.routeMessage( AbstractMessageReceiver.java:305)=20 at org.mule.providers.AbstractMessageReceiver.routeMessage( AbstractMessageReceiver.java:244)=20 at org.mule.providers.file.FileMessageReceiver.processFile( FileMessageReceiver.java:198)=20 at org.mule.providers.file.FileMessageReceiver.poll( FileMessageReceiver.java:106)=20 at org.mule.providers.PollingMessageReceiver.run( PollingMessageReceiver.java:71)=20 at org.mule.impl.work.WorkerContext.run( WorkerContext.java:317)=20 at = edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.= runTask( ThreadPoolExecutor.java:650)=20 at = edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.= run( ThreadPoolExecutor.java:675)=20 at java.lang.Thread.run(Unknown Source) =20 -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= 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=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Harold F. <har...@gm...> - 2006-12-13 19:43:12
|
Hello, I am trying to use the conversion from an Xml Document into a CVS flat file. I am getting an error that I am not sure where it comes from. It is related to a well-formed character or markup, but the Xml document I am using is well formed. I am attaching the xml file, serving xml resource and error message. Thanks in advance guys for any help in this matter. <?xml version="1.0" encoding="utf-8"?> <sx:resources xmlns:sx="http://www.servingxml.com/core"> <sx:service id="fromXmlToESGFile" > <sx:recordStream> <sx:xmlRecordReader> <sx:inverseRecordMapping ref="ESG_USG_V10_FileMapping" /> <sx:transform> <sx:document /> </sx:transform> </sx:xmlRecordReader> <sx:flatFileWriter> <sx:flatFile ref="ESG_USG_V10_File" /> </sx:flatFileWriter> </sx:recordStream> </sx:service> <sx:flatFile id="ESG_USG_V10_File" > <sx:flatFileBody> <sx:flatRecordType ref="DocumentInfoType" /> </sx:flatFileBody> </sx:flatFile> <sx:flatRecordType id="DocumentInfoType" name="DocumentInfoType" > <sx:fieldDelimiter value="," /> <sx:delimitedField name="RecordIndicator"/> <sx:delimitedField name="DocumentId" /> <sx:delimitedField name="DocumentDate" /> <sx:delimitedField name="DocumentTime" /> <sx:delimitedField name="OriginatorDUNS" /> <sx:delimitedField name="OriginatorName" /> <sx:delimitedField name="RecipientDUNS" /> <sx:delimitedField name="RecipientName" /> <sx:delimitedField name="VersionNumber" /> <sx:delimitedField name="ExternalDocumentId" /> <sx:delimitedField name="PriorityCode" /> <sx:delimitedField name="RecordType" /> </sx:flatRecordType> <sx:inverseRecordMapping id="ESG_USG_V10_FileMapping" > <sx:onSubtree path="/ESG_USG_V10/DocumentInfo" > <sx:subtreeRecordMap recordType="DocumentInfo" > <sx:subtreeFieldMap select="1" field="RecordIndicator" /> <sx:subtreeFieldMap select="2" field="DocumentId" /> <sx:subtreeFieldMap select="3" field="DocumentDate" /> <sx:subtreeFieldMap select="4" field="DocumentTime" /> <sx:subtreeFieldMap select="5" field="OriginatorDUNS" /> <sx:subtreeFieldMap select="6" field="OriginatorName" /> <sx:subtreeFieldMap select="7" field="RecipientDUNS" /> <sx:subtreeFieldMap select="8" field="RecipientName" /> <sx:subtreeFieldMap select="9" field="VersionNumber" /><!-- <sx:subtreeFieldMap select="10" field="ExternalDocumentId" /> <sx:subtreeFieldMap select="11" field="PriorityCode" /> <sx:subtreeFieldMap select="12" field="RecordType" /> --></sx:subtreeRecordMap> </sx:onSubtree> </sx:inverseRecordMapping> </sx:resources> Source: <ESG_USG_V10><DocumentInfo><1>H</1><2>2006081205230112006933519</2><3>01929300</3><4>05:23:01:12</4><5>006933519</5><6>AMEREN IP</6><7>999999999</7><8>SAMPLE MARKETER</8><9>1.0 </9><10/><11/><12/></DocumentInfo></ESG_USG_V10> Error: [Fatal Error] com.servingxml.io.cache.DefaultKey3:1:29: The content of elements must consist of well-formed character data or markup. * com.servingxml.util.ServingXmlException*: The content of elements must consist of well-formed character data or markup. at com.servingxml.components.xmlpipeline.MainPipeline.execute(* MainPipeline.java:118*) at com.servingxml.components.inverserecordmapping.XmlRecordReader.readRecords(* XmlRecordReader.java:94*) at com.servingxml.components.recordio.DefaultRecordPipeline.execute(* DefaultRecordPipeline.java:87*) at com.servingxml.components.recordio.RecordStreamBuilder.execute(* RecordStreamBuilder.java:75*) at com.servingxml.components.service.ServiceImpl.execute(*ServiceImpl.java :61*) at com.bluestarenergy.edi.service.common.RecordTransformerServiceImpl.transformRecord (*RecordTransformerServiceImpl.java:83*) at com.bluestarenergy.edi.component.usage.ECInfoUsageFileReader.readFile(* ECInfoUsageFileReader.java:43*) at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.mule.model.DynamicEntryPoint.invokeCurrent(*DynamicEntryPoint.java :260*) at org.mule.model.DynamicEntryPoint.invoke(*DynamicEntryPoint.java:171*) at org.mule.impl.DefaultLifecycleAdapter.intercept(* DefaultLifecycleAdapter.java:202*) at org.mule.impl.InterceptorsInvoker.execute(*InterceptorsInvoker.java:51*) at org.mule.interceptors.InterceptorStack$Invoc.execute(* InterceptorStack.java:73*) at org.mule.interceptors.TimerInterceptor.intercept(*TimerInterceptor.java :42*) at org.mule.interceptors.InterceptorStack$Invoc.execute(* InterceptorStack.java:68*) at org.mule.interceptors.EnvelopeInterceptor.intercept(* EnvelopeInterceptor.java:44*) at org.mule.interceptors.InterceptorStack$Invoc.execute(* InterceptorStack.java:68*) at org.mule.interceptors.InterceptorStack.intercept(*InterceptorStack.java :48*) at org.mule.impl.InterceptorsInvoker.execute(*InterceptorsInvoker.java:51*) at org.mule.impl.model.DefaultMuleProxy.onCall(*DefaultMuleProxy.java:258*) at org.mule.impl.model.seda.SedaComponent.doSend(*SedaComponent.java:328*) at org.mule.impl.model.AbstractComponent.sendEvent(*AbstractComponent.java :415*) at org.mule.impl.MuleSession.sendEvent(*MuleSession.java:352*) at org.mule.routing.inbound.InboundMessageRouter.send(* InboundMessageRouter.java:181*) at org.mule.routing.inbound.InboundMessageRouter.route(* InboundMessageRouter.java:147*) at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage (*AbstractMessageReceiver.java:559*) at org.mule.providers.AbstractMessageReceiver.routeMessage(* AbstractMessageReceiver.java:305*) at org.mule.providers.AbstractMessageReceiver.routeMessage(* AbstractMessageReceiver.java:244*) at org.mule.providers.file.FileMessageReceiver.processFile(* FileMessageReceiver.java:198*) at org.mule.providers.file.FileMessageReceiver.poll(* FileMessageReceiver.java:106*) at org.mule.providers.PollingMessageReceiver.run(* PollingMessageReceiver.java:71*) at org.mule.impl.work.WorkerContext.run(*WorkerContext.java:317*) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask (*ThreadPoolExecutor.java:650*) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run (*ThreadPoolExecutor.java:675*) at java.lang.Thread.run(Unknown Source) -------------------- The content of elements must consist of well-formed character data or markup. * org.xml.sax.SAXParseException*: The content of elements must consist of well-formed character data or markup. at org.apache.xerces.parsers.AbstractSAXParser.parse(*AbstractSAXParser.java :1183*) at com.servingxml.io.saxsource.StreamXmlReaderAdaptor.parse(* StreamXmlReaderAdaptor.java:119*) at com.servingxml.components.xmlpipeline.MainPipeline.execute(* MainPipeline.java:109*) at com.servingxml.components.inverserecordmapping.XmlRecordReader.readRecords(* XmlRecordReader.java:94*) at com.servingxml.components.recordio.DefaultRecordPipeline.execute(* DefaultRecordPipeline.java:87*) at com.servingxml.components.recordio.RecordStreamBuilder.execute(* RecordStreamBuilder.java:75*) at com.servingxml.components.service.ServiceImpl.execute(*ServiceImpl.java :61*) at com.bluestarenergy.edi.service.common.RecordTransformerServiceImpl.transformRecord (*RecordTransformerServiceImpl.java:83*) at com.bluestarenergy.edi.component.usage.ECInfoUsageFileReader.readFile(* ECInfoUsageFileReader.java:43*) at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.mule.model.DynamicEntryPoint.invokeCurrent(*DynamicEntryPoint.java :260*) at org.mule.model.DynamicEntryPoint.invoke(*DynamicEntryPoint.java:171*) at org.mule.impl.DefaultLifecycleAdapter.intercept(* DefaultLifecycleAdapter.java:202*) at org.mule.impl.InterceptorsInvoker.execute(*InterceptorsInvoker.java:51*) at org.mule.interceptors.InterceptorStack$Invoc.execute(* InterceptorStack.java:73*) at org.mule.interceptors.TimerInterceptor.intercept(*TimerInterceptor.java :42*) at org.mule.interceptors.InterceptorStack$Invoc.execute(* InterceptorStack.java:68*) at org.mule.interceptors.EnvelopeInterceptor.intercept(* EnvelopeInterceptor.java:44*) at org.mule.interceptors.InterceptorStack$Invoc.execute(* InterceptorStack.java:68*) at org.mule.interceptors.InterceptorStack.intercept(*InterceptorStack.java :48*) at org.mule.impl.InterceptorsInvoker.execute(*InterceptorsInvoker.java:51*) at org.mule.impl.model.DefaultMuleProxy.onCall(*DefaultMuleProxy.java:258*) at org.mule.impl.model.seda.SedaComponent.doSend(*SedaComponent.java:328*) at org.mule.impl.model.AbstractComponent.sendEvent(*AbstractComponent.java :415*) at org.mule.impl.MuleSession.sendEvent(*MuleSession.java:352*) at org.mule.routing.inbound.InboundMessageRouter.send(* InboundMessageRouter.java:181*) at org.mule.routing.inbound.InboundMessageRouter.route(* InboundMessageRouter.java:147*) at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage (*AbstractMessageReceiver.java:559*) at org.mule.providers.AbstractMessageReceiver.routeMessage(* AbstractMessageReceiver.java:305*) at org.mule.providers.AbstractMessageReceiver.routeMessage(* AbstractMessageReceiver.java:244*) at org.mule.providers.file.FileMessageReceiver.processFile(* FileMessageReceiver.java:198*) at org.mule.providers.file.FileMessageReceiver.poll(* FileMessageReceiver.java:106*) at org.mule.providers.PollingMessageReceiver.run(* PollingMessageReceiver.java:71*) at org.mule.impl.work.WorkerContext.run(*WorkerContext.java:317*) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask (*ThreadPoolExecutor.java:650*) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run (*ThreadPoolExecutor.java:675*) at java.lang.Thread.run(Unknown Source) |
From: Yagni, R. <Rav...@co...> - 2006-10-30 23:02:26
|
Hello All: I am trying to write XML to flat file and here is my < inverseRecordMapping> =20 <sx:inverseRecordMapping id=3D"OCSAPXMLToFileMapping"> <sx:onSubtree path=3D"/LoadPayable"> <sx:parameter name=3D"type" select=3D"ApplicationArea/Sender/ReferenceID/@type"/> <sx:subtreeRecordMap recordType=3D"TRecord"> <sx:subtreeFieldMap select=3D"'T'" field=3D"tag"/> <sx:subtreeFieldMap select=3D"$type" field=3D"filetype"/> <sx:subtreeFieldMap select=3D"ApplicationArea/CreationDateTime" field=3D"datetime"/> <sx:subtreeFieldMap select=3D"ApplicationArea/Sender/ReferenceID" field=3D"batchid"/> <sx:subtreeFieldMap select=3D"DataArea/@transactioncount" field=3D"transcount"/> <sx:subtreeFieldMap select=3D"DataArea/@totalUnits" field=3D"totalunits"/> <sx:subtreeFieldMap select=3D"DataArea/@totalDebit" field=3D"totaldebamt"/> <sx:subtreeFieldMap select=3D"DataArea/@totalCredit" field=3D"totalcrdamt"/> </sx:subtreeRecordMap> <sx:subtreeRecordMap match=3D"DataArea/Payable" recordType=3D"HRecord"> =20 <sx:subtreeFieldMap select=3D"'H'" field=3D"tag"/> =20 <sx:subtreeFieldMap select=3D"$type" field=3D"filetype"/> =20 <sx:subtreeFieldMap select=3D"PayableHeader/CostCenterID" field=3D"costcenter"/> =20 <sx:subtreeFieldMap select=3D"PayableHeader/AccountingDate/BusinessWeek" field=3D"week"/> </sx:subtreeRecordMap> <sx:subtreeRecordMap match=3D"DataArea/Payable" recordType=3D"DRecord"> =20 <sx:subtreeFieldMap select=3D"'D'" field=3D"tag"/> =20 <sx:subtreeFieldMap select=3D"PayableLine/ReferenceDocumentID" field=3D"docid"/> =20 <sx:subtreeFieldMap select=3D"PayableLine/GLAccount/GLNominalAccount" field=3D"glaccount"/> </sx:subtreeRecordMap> </sx:onSubtree> </sx:inverseRecordMapping> =20 It is writing to flat file but my "TRecord" (shown highlighted BOLD in XML above) has always been written to the end!! I want this to be first line because this is a header record. I followed all the examples and spent lot of time on this but I see everywhere that values in the header record are CONSTANTS but in my case I have to get it from XML. I hope I am giving as much information as I can, and any help would be greatly appreciated. =20 Here is my sample flat file: H OPERATION WE DINVOICE NUMBER GLAccount=20 H OPERATION WE DINVOICE NUMBER G/L ACCOUN TA/P2006-08-22T09:13:47.358-04:00 IUPUIAPMMDDNN 2 2 100.00 100.00 (I want this record to be first lline because this is header information) =20 =20 Thanks. --Ravi DISCLAIMER Important! This message is intended for the above named person(s= ) only and is CONFIDENTIAL AND PROPRIETARY. If you are not the intended rec= ipient of this e-mail and have received it in error, please immediately not= ify the sender by return email and then delete it from your mailbox. This m= essage may be protected by the attorney-client privilege and/or work produc= t doctrine. Accessing, copying, disseminating or re-using any of the infor= mation contained in this e-mail by anyone other than the intended recipient= is strictly prohibited. Finally, you should check this email and any attac= hments for the presence of viruses, as the sender accepts no liability for = any damage caused by any virus transmitted by this email. Thank you.=0D |
From: Daniel P. <dan...@sy...> - 2006-10-22 23:18:17
|
Yes. I tested my example sent earlier with =20 <sx:fieldDelimiter value=3D"	"/> and that worked as well. Danie Parker ----- Original Message -----=20 From: Harry Honing; home=20 To: Daniel Parker=20 Cc: ser...@li...=20 Sent: Friday, October 20, 2006 3:02 AM Subject: Re: [Servingxml-help] Using TAB as delimiter in flat file Do you know if there is a possibility to set hex-values for the = delimiter. |
From: Daniel P. <dan...@sy...> - 2006-10-22 22:35:49
|
Hello Harry, I tested an example with horizontal tab delimiter (x09), using the = resources script below, with ServingXML version 0.5.5 <sx:resources xmlns:sx=3D"http://www.servingxml.com/core"> <sx:service id=3D"employees"> <sx:serialize> <sx:transform> <sx:content ref=3D"employee-data"/> </sx:transform> </sx:serialize> </sx:service> <sx:recordContent id=3D"employee-data" name=3D"employees"> <sx:flatFileReader> <sx:urlSource url=3D"data/tab_delimited_data.txt"/> <sx:flatFile ref=3D"employee-file"/> </sx:flatFileReader> </sx:recordContent> <sx:flatFile id=3D"employee-file"> <sx:flatFileBody> <sx:flatRecordType name=3D"employee"> <sx:fieldDelimiter value=3D"\t"/> <sx:delimitedField name=3D"social-security-number"/> <sx:delimitedField name=3D"employee-name"/> <sx:delimitedField name=3D"salary"/> </sx:flatRecordType> </sx:flatFileBody> </sx:flatFile> </sx:resources> It worked as expected, so I can't help without more information. If you = can prepare a short failing example, and send it to me as a zipped = attachment to the inquiries email on the home page, I'll investigate = further. Regards, Daniel Parker ----- Original Message -----=20 From: Harry Honing; home=20 To: Daniel Parker=20 Cc: ser...@li...=20 Sent: Friday, October 20, 2006 3:02 AM Subject: Re: [Servingxml-help] Using TAB as delimiter in flat file Hello Daniel, Thnak you for responding.=20 I tried it out but this did not work out. I know the tab is in the flat file X'09'. Do you know if there is a = possibility to set hex-values for the delimiter. Or using the ascii escape value in some way.=20 Is there in the books a place where to find these kind of codes (like = your suggestion for \t)=20 Kind regards, Harry Daniel Parker schreef:=20 Hello Harry, Try using=20 <sx:fieldDelimiter value=3D"\t"/> inside your sx:flatRecordType declaration. Best regards, Daniel ----- Original Message -----=20 From: Harry Honing; home=20 To: ser...@li...=20 Sent: Thursday, October 19, 2006 10:18 AM Subject: [Servingxml-help] Using TAB as delimiter in flat file Hi, I'm new to servingxml and i hope that somebody knows a solution. My flat file has a <TAB> as field delimiter (hex'09'). I cannot = find how to tell servingxml that it should use that value for dilimiter. My goal is to go fromflat-delimited to xml Kind Regards, Harry -------------------------------------------------------------------------= - = -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your = job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo = http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642=20 -------------------------------------------------------------------------= - _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your job = easier Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo = http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Daniel P. <dan...@sy...> - 2006-10-20 12:34:34
|
Harry, Thanks for the feedback. The special encodings - \t, \r, and \n - are noted in the = sx:fieldDelimiter element reference entry. I'll investigate and respond = by Monday, with a fix if required. Daniel ----- Original Message -----=20 From: Harry Honing; home=20 To: Daniel Parker=20 Cc: ser...@li...=20 Sent: Friday, October 20, 2006 3:02 AM Subject: Re: [Servingxml-help] Using TAB as delimiter in flat file Hello Daniel, Thnak you for responding.=20 I tried it out but this did not work out. I know the tab is in the flat file X'09'. Do you know if there is a = possibility to set hex-values for the delimiter. Or using the ascii escape value in some way.=20 Is there in the books a place where to find these kind of codes (like = your suggestion for \t)=20 Kind regards, Harry Daniel Parker schreef:=20 Hello Harry, Try using=20 <sx:fieldDelimiter value=3D"\t"/> inside your sx:flatRecordType declaration. Best regards, Daniel ----- Original Message -----=20 From: Harry Honing; home=20 To: ser...@li...=20 Sent: Thursday, October 19, 2006 10:18 AM Subject: [Servingxml-help] Using TAB as delimiter in flat file Hi, I'm new to servingxml and i hope that somebody knows a solution. My flat file has a <TAB> as field delimiter (hex'09'). I cannot = find how to tell servingxml that it should use that value for dilimiter. My goal is to go fromflat-delimited to xml Kind Regards, Harry -------------------------------------------------------------------------= - = -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your = job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo = http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642=20 -------------------------------------------------------------------------= - _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Harry H. h. <Har...@Do...> - 2006-10-20 07:03:15
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <font size="-1"><font face="Tahoma">Hello Daniel,<br> <br> Thnak you for responding. <br> I tried it out but this did not work out.<br> <br> I know the tab is in the flat file X'09'. Do you know if there is a possibility to set hex-values for the delimiter.<br> Or using the ascii escape value in some way. <br> <br> Is there in the books a place where to find these kind of codes (like your suggestion for \t) <br> <br> Kind regards,<br> <br> Harry<br> </font></font><br> Daniel Parker schreef: <blockquote cite="mid003e01c6f3f9$e85db760$8119fea9@ginger" type="cite"> <title></title> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <meta content="MSHTML 6.00.2900.2963" name="GENERATOR"> <style></style> <div><font face="Arial" size="2">Hello Harry,</font></div> <div> </div> <div><font face="Arial" size="2">Try using </font></div> <div> </div> <div><font face="Arial" size="2"> <sx:fieldDelimiter value="\t"/><br> </font></div> <div><font face="Arial" size="2">inside your sx:flatRecordType declaration.</font></div> <div> </div> <div><font face="Arial" size="2">Best regards,</font></div> <div><font face="Arial" size="2">Daniel</font></div> <blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div> <div style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b> <a title="Har...@Do..." href="mailto:Har...@Do...">Harry Honing; home</a> </div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="ser...@li..." href="mailto:ser...@li...">ser...@li...</a> </div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Thursday, October 19, 2006 10:18 AM</div> <div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> [Servingxml-help] Using TAB as delimiter in flat file</div> <div><br> </div> <font size="-1"><font face="Tahoma">Hi,<br> <br> I'm new to servingxml and i hope that somebody knows a solution.<br> <br> My flat file has a <TAB> as field delimiter (hex'09'). I cannot find how to tell servingxml that it should use that value for dilimiter.<br> <br> My goal is to go fromflat-delimited to xml<br> <br> Kind Regards,<br> Harry<br> </font></font> <p> </p> <hr> -------------------------------------------------------------------------<br> Using Tomcat but need to do more? Need to support web services, security?<br> Get stuff done quickly with pre-integrated technology to make your job easier<br> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo<br> <a class="moz-txt-link-freetext" href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642</a> <p> </p> <hr> _______________________________________________<br> Servingxml-help mailing list<br> <a class="moz-txt-link-abbreviated" href="mailto:Ser...@li...">Ser...@li...</a><br> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/servingxml-help">https://lists.sourceforge.net/lists/listinfo/servingxml-help</a><br> </blockquote> </blockquote> </body> </html> |
From: Daniel P. <dan...@sy...> - 2006-10-20 03:43:35
|
Hello Harry, Try using=20 <sx:fieldDelimiter value=3D"\t"/> inside your sx:flatRecordType declaration. Best regards, Daniel ----- Original Message -----=20 From: Harry Honing; home=20 To: ser...@li...=20 Sent: Thursday, October 19, 2006 10:18 AM Subject: [Servingxml-help] Using TAB as delimiter in flat file Hi, I'm new to servingxml and i hope that somebody knows a solution. My flat file has a <TAB> as field delimiter (hex'09'). I cannot find = how to tell servingxml that it should use that value for dilimiter. My goal is to go fromflat-delimited to xml Kind Regards, Harry -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= Using Tomcat but need to do more? Need to support web services, = security? Get stuff done quickly with pre-integrated technology to make your job = easier Download IBM WebSphere Application Server v.1.0.1 based on Apache = Geronimo = http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 -------------------------------------------------------------------------= ----- _______________________________________________ Servingxml-help mailing list Ser...@li... https://lists.sourceforge.net/lists/listinfo/servingxml-help |
From: Harry H. h. <Har...@Do...> - 2006-10-19 14:19:00
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <font size="-1"><font face="Tahoma">Hi,<br> <br> I'm new to servingxml and i hope that somebody knows a solution.<br> <br> My flat file has a <TAB> as field delimiter (hex'09'). I cannot find how to tell servingxml that it should use that value for dilimiter.<br> <br> My goal is to go fromflat-delimited to xml<br> <br> Kind Regards,<br> Harry<br> </font></font> </body> </html> |