NILESH PATEL

Ranch Hand
+ Follow
since Nov 21, 2000
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by NILESH PATEL

Could you please post an example if it is handy. I am trying to do similar thing. My rmi stuff, once it finishes, it still holds memory on /tmp filesystem on AIX.
To relase that memory i have to kill remote process manually, which gets respawned after lokking at inittab.
But at least memeory gets freed that way. However it will be nice to see special shutdown message that you talked about to kill a remote process.
Please help me.,
Thanks
nilesh patel
19 years ago
Dear friends,
I just generated java classes from XSD file using JAXB. What i noticed is if you specify attribute with underscore (_) e.g.
<xs:attribute name="my_name" type="xs:string/>
then generated interfaces create get/set methods but removes Underscore. i.e.
...
...
public String getMyName();
..
..
in interface. Is there any switch awailable to turn this off and get the exact name, with just prepend with get. i.e.
public String getMy_name();
Please let me know.
Thanks in advance
nilesh patel
Hi all,
Is there any way in JAXB, that we can define in xsd or xjb, that only get methods are generated or set methods are generated, but not both. Ideally I want to do this:
Imyinterface1 defines get methods.
Imyinterface2 defines set methods and extends Imyinterface1
Myclass implements Imyinterface2.
This would allow me to pass Imyinterface1 objects around to get access to data but not to be able to write, i.e. read only bean. If I have need read-write access then I have to pass Imyinterface2. All get/sets can be implemetned in Myclass.
Please let me know if we can achieve this using JAXB code generation process.
Thanks in advance.
Nilesh Patel
Thanks for your reply.
I tried that but the problem with that is, it does not support css, so can not really use it. It has its own benefit of speed but does not look nice when you want to display the colour scheme and stuff..
Nilesh
20 years ago
Dear friends,
I am using JEditorPane to display html page, which comes from my local drive. I can display it fine, but when I hit button to display it drwas in sections as it reads from hard disk.
My question is what code I should use, so that it is loaded into memory first and then display in a flash, NOT step-by-step.
Please help
Thanks
Nilesh
20 years ago
If one wants to create a duplicate key with different values then, what class/interface is the best to use, Any Ideas?
Thanks
Nilesh
20 years ago
Dear friends,
I wrote a simple test program, which uses Hashtable and its put(xx,xx) and get(xx) methods. code looks like this:
Hashtable table = new Hashtable();
table.put("name", "nilesh");
table.put("name", "hemen");
table.put("name", "Piyush");
for (int i=0; i<table.size(); i++)
{
System.out.println("NAME IS: " + table.get("name"));
}
My output was:
NAME IS: Piyush
I need output to be:
NAME IS: nilesh
NAME IS: hemen
NAME IS: Piyush
Is there anythig else I can use which would allow me to put multiple entries for same keys. and return output as required.
Thanks in advance
Nilesh
20 years ago
I don't have any comment against the postings, but just wondering how you are creating .jpg file using java or something else on the fly. That may be useful to me, as I want to create a xsl transformation of xml data to html and then display numeric data in graph/piechart form or something. In this case I may have to generate .jp or .gif image first.
Please let me know if you can, on how to create image on the fly.
my email is: jayagnesh786@hotmail.com
Thanks
Nilesh
20 years ago
Dear friends,
I am facing a small problem when I am loading basic html page using JEditorPane. I am using .setPage(url) method, but when the document is loaded it gets displayed in, sort of, broken pieces.
Is it possible to buffer the document first and then display the whole thing at once?
Please let me know if someone as faced the same situation

Thanks
Nilesh
20 years ago
Hi
I have faced similar problem with not quite the web page, but I created a document in a word with links and stuff then saved into an html file. then I tried to load that html doc in JEditor pane, the display was nowhere near to the one in IE, Opera or so on. Later I found out this was due to the way somw html docs have style features associated with it for which there is no support in using JEditorPane. In fact you can do only very basic with Jeditorpane when we deal with html files. I hope it improves in the near future, otherwise we will have to reply on invoking IE or netscape or opera, whatever is istalled on local computer to display html pages.
My personal suggestion to you would be, if suitable to you of course, is use one of the readily available class to invoke IE from underlying system and then go from ther, forget about java-html browser for time being. Even if you find oure java-html browser with full support, it will be dead slow.
However its been about six months since I looked around for this kind of stuff, so if you find better solution please let me know.
Thanks
Nilesh
20 years ago
Sorry Folks,
My fault. I should have put indexdoc varaible line like this, which I missed.
<xsl:variable name="indexdoc" select="document(concat($file_path, $xml_dir, 'index.xml'))"/>
It works now
Thanks and sorry
Nilesh
Dear all,
I have a xml document as below which is broken at the moment becasue of global variable related problem. I am trying to allocate a global variable on the fly thorugh java. Varibale called "prodid" takes "file_path" and "xml_dir" to call "index.xml" doc from the specified values from java. The problem I might be facing is when I call document for indexdoc variable, ti looks for "index.doc" document in xsl document's parent directory. This tells me that at this point file_path and xml_dir are not allocated values.
I hope this makes sense, If not then please let me know so that we can resolve this. Basically I don't want to give absolute path to indexdoc variable. The path will be the same as concat($fle_path, $xml_dir).
Here is my XML:
+++++++++++++++++++
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
Document : File_Systems
Created on : 21 February 2002
Author : nilesh
Comment
purpose of transformation follows.
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xalan="http://xml.apache.org/xalan"
exclude-result-prefixes="xalan"
>
<xsl utput method="html" version="4.0" encoding="iso-8859-1" indent="yes" />

<xsl aram name="file_path"/>
<xsl aram name="xml_dir"/>
<xsl aram name="xsl_dir"/>
<xsl aram name="html_dir"/>

<xsl:variable name="indexdoc" select="document(concat(file_path, xml_dir, 'index.xml'))"/>

<xsl:variable name="prodid" select="$indexdoc/root/@productID"/>


<xsl:template match="root">
<html>
<head>
<link rel="stylesheet" type="text/css">
<xsl:attribute name="href">
<xsl:text>../css_data/</xsl:text>
<xsl:value-of select="$prodid " />
<xsl:text>.css</xsl:text>
</xsl:attribute>
</link>
.........................
</xsl:stylesheet>
Thanks in advance
Nilesh Patel
Dear all,
I have created a JEditorPane, which takes html page as part of setpage method. The problem is, when html page has a tag like this:
<a href="#chapter4" title="Got to chapter 4">chapter 4</a>
In IE title is displayed as a tooltip, but in JEditorPane, loading same html page, tooltip is not displayed. Does someone know whether I need to use any method from java to turn this feature ON or something similar.
Thanks in advance
Nilesh
20 years ago
That works
Brilliant. Just wondering though, how would it affect the performance of transformation if you set about 10 parameters on the fly. I am thinking of a separate thread anyway for this process but it will be nice to know its performance relevance.
Thanks again for your kind co-operation.
Nilesh
Dear all,
could someone show me how to set variables in current xsl file, which may be in the form of DomSource object or Document object in java. XSL file is shown below.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:template match="test">
<html>
<head/>
<body>
<xsl:value-of select="$file_path"/>
</body>
</xsl:template>

</xsl:stylesheet>
What I would like to do is in java code I would like to set some global variables for style sheet to use, e.g. $file_path. Obviously I would like to set file path as per the platform use, either unix(/home/nilesh/...) or windows(c:/...). I tried using create element method of Node interface, but does not seem to be working.
Please help,
Nilesh