You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Karthikeyan M. <km...@li...> - 2004-07-27 16:36:49
|
The solution depends on the use case. I used to use regular expressions in combination with the xpath expressions to handle form posts. Supposing that you are getting the information as: <formfieldname> => <field-value> firstname1 => x1 firstname2 => x2 lastname1 => y1 lastname2 => y2 I had a regular expression of the form firstname(\d+) and get the number from it and use it in my "/user/person["+<matched-value>>+"]/firstname" If you have a different use case, then you can use a counter to set the number correct. The translet itself is quite stateless. You need to give it enough information to figure it out that the following sequence all belongs to the same person element: "/user/person/firstname" "/user/person/lastname" "/user/person/ssn" Alternatively, if you getting data bursts, you can have two DOMs and create nodes in the one dom and detach and attach it to the other dom after each pass. In that case you need to have only one set of XPaths without any numbers in it. hope that helps, -karthik Manoj K Jain wrote: >Hi Karthikeyan > > I am facing a problem inserting repeated nodes in the xml using >XPATH, I just want to ask that whether I can use xpath to create >repeated nodes in the XML file without mentioning the number with the >repeating node in the XPATH as our xml is dynamic and it can contain >repeated any number of times . Could you please give me some information >on this. > >Regards, >Manoj Jain > > >-----Original Message----- >From: Karthikeyan M. [mailto:km...@li...] >Sent: Saturday, July 17, 2004 12:21 AM >To: Manoj K Jain >Cc: tra...@li... >Subject: Re: Query > >Hi Manoj, > > Seems like the version of xalan you have may be different. Can you >please tell me the version of the xalan that you are using? >-karthik >--- Manoj K Jain <man...@in...> wrote: > > Hi > > > > I was just testing your code but I faced this problem > > > > >Exception in thread "main" java.lang.NoSuchMethodError > > at > > org.translet.processor.XPathProcessorImpl.processXPath(XPathProcessor > > Impl.java:69) > > at > > org.translet.processor.Translator.translate(Translator.java:127) > > at > > DataTranslator.translate(DataTranslator.java:41) > > at DataTranslator.main(DataTranslator.java:52) > > > > > > Could you please give me the possible solution of this > problem.. > > > > > > Regards, > > Manoj > > > > > > |
|
From: Karthikeyan M. <km...@li...> - 2004-07-16 18:50:38
|
Hi Manoj,
Seems like the version of xalan you have may be different. Can you
please tell me the version of the xalan that you are using?
-karthik
--- Manoj K Jain <man...@in...> wrote:
> Hi
>
> I was just testing your code but I faced this problem
>
>
>
> Exception in thread "main" java.lang.NoSuchMethodError
> at
> org.translet.processor.XPathProcessorImpl.processXPath(XPathProcessor
> Impl.java:69)
> at
> org.translet.processor.Translator.translate(Translator.java:127)
> at
> DataTranslator.translate(DataTranslator.java:41)
> at DataTranslator.main(DataTranslator.java:52)
>
>
> Could you please give me the possible solution of this
> problem..
>
>
> Regards,
> Manoj
>
|
|
From: Karthikeyan M. <mak...@ya...> - 2002-07-30 05:50:21
|
--- Mani Subramani <msu...@li...> wrote: > Hi Karthik, I am Mani, I am the one who give Pakshi a hard time in > ping pong :-) just kidding > Good to hear that you are chasing him hard. He needs a lot of running now! > Thanks for introducing to your project. I read the description, its > sounds very interesting. I have a few questions , please reply > whenever you are free > > 1. Do you always assume that you are going back from XSLT to XML ? In > other words, can this tool be also used in a place where the 'view' > path doesn't have XSLT , but for some reason there's a need to > transform 'from-HTML Client-to-server' data back to XML The short answer is, yes you can. The concept behind is actually much simple. Once you want to create an XML document, you need to know it's structure. If you know it's structure and have the complete XML document in your mind (hypothetical at this time, as the document is not yet created), you can create a mapping between each value in the document to it's XPath in the hypothetical document. Unlike the document itself which is hypothetical at this point, the mapping is real. So, all you need to do is the reverse of what XSLT or XPointer does. Parse the XPath and create the nodes on the way. > 2. Can you describe a more concrete use case / example of the purpose > of the tool. Actually, this concept is already at work here in Vitalect, but, in a much restricted and nascent form. The use case is that we have to create XML documents from the form input user has submitted using HTML form. There are many such form all over the application and we need to create many different kinds of XML documents. I implemented this translet concept for that. We have a mapping of the form field names to it's actual XPath in the document. Once the form is submitted, we retrieve the XPath value for each of the form field and create the node/branch in the XML document. > 3. How is this problem currently solved ? Is it by implementing XML > 'writers' that use the DTD/Schema and data and make the XMLs ? > From my own research on this, I found people mostly do it the hard way (hard compared to the technique this translet uses). They write java (c++ or whatever language) code to create each node and attach it to it's parents etc., This may be the very obvious method, but one that involves constant maintenance and one that is very less re-usable. Each time you come-up with a new XML document or change your DTD, you have rework the entire code. > Thanks and good luck for the project, it sounds really interesting > Thanks for your queries. Will keep you posted. Would welcome any suggestion and ideas, I guess that is how an open source project grows. > ~M > -karthik __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com |