Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About awitt

  • Rank
  • Birthday 02/19/1986

Previous Fields

  • Languages
    Javascript, XML, Java, VB, C++, C#, *.NET, T-SQL

Contact Methods

  • MSN
  • Website URL
  • ICQ

Profile Information

  • Location
    Columbus, OH
  1. Hey Guys, I'm designing an online store. I'm using struts to maintain an MVC-type architecture, but I do not think that should have too much an impact on my issues here. So, when you're shoping online, and you click 'Add to Cart' or whatever, and alot of times it brings you to your cart page and shows the stuff. Well, I made a cart widget that sits in the corner, so that, at least until checkout, you don't need to go to a seperate cart page. So the problem here is that when you click add-to-cart, I want that exact same page to reload, with whatever request paramaters it had before (if th
  2. Hey Guys, I'm building a table using Java on a JSP, and I have a portion of the table that I want to either hide or display, depending on if a box is checked or not (it's the old is-your-shipping-address-the-same-as-your-billing checkbox from a checkout page). Here's the JS function that gets called when the box is clicked. <span id="shippingInfo"> <tr> <td colspan="2"><br /><hr /></td> </tr> <tr> <td colspan="2" class="sectionHeader">
  3. awitt

    Jaxp Xml Processing

    I think you're on the right trail. Let me see if I can create a visual:The user wants to watch one of our hosted videos, but that video is hosted somewhere else now. The old link references that video (that used to be on our file system) using the file name, which in the XML file I have, is called originalFileKey. But now, it's in another system, which references the file by a system-generated assetID. The XML file I have is from this new system, so it does contain both the old 'file name' (originalFileKey) and the new 'file name' (assetID). So my purpose is to find out what the new syste
  4. awitt

    Jaxp Xml Processing

    Hmm, interesting responses. Firstly, to boen_robot: so you're saying I can use the same methods and such to manipulate the XML DOM, the same way I did with JavaScript? That's what I'd rather do; I know it more and this is a static, hosted XML file, so it's not going to be growing or anything like that. Secondly, to stransky: here's the purpose for my endeavors. I have a static XML file that contains, among other things, an originalFileKey and an AssetID. What's happening is that a user will be visiting a URL with a filename (i.e. the originalFileKey) and I will pull that filename from the
  5. awitt

    Jaxp Xml Processing

    While I honestly do appreciate all the info about why or why not XML may be good, I need some help using a Java based approach, specifically outputting a certain attribute within an XML element onto a JSP page. So, really, all I need is some direction or tips using a JAXP API. I've actually done some XML parsing and processing using JavaScript before, but, unfortunately for me, I cannot use that approach this time. Thank you, though, stransky.
  6. awitt

    Jaxp Xml Processing

    I need to do some simple XML processing using Java. All I have to do is step through an XML file until I find a match to a file name that is stored within each element. I use Java often, but I'm unfamiliar with the JAXP APIs. Can anyone get me started?
  7. I need to do some simple XML processing using Java. All I have to do is step through an XML file until I find a match to a file name that is stored within each element. I use Java often, but I'm unfamiliar with the JAXP APIs. Can anyone get me started?
  8. awitt

    Asp Classic Casting

    Does anyone know how I can cast a bit (in an SQL DB) object to a boolean (in ASP Classic)?
  9. I don't know much on the subject,. but I think you're going to be looking at utilizing web services and such. Try doing a little research on that topic.
  10. awitt

    File Watch

    Here's the implementation I used, posted here for posterity's sake.import java.io.BufferedWriter;import java.io.File;import java.io.FileNotFoundException;import java.io.FileWriter;import java.io.IOException;import java.util.Date;import java.text.Format;import java.text.SimpleDateFormat;public class filename_listing{ public static void main(String[] args) throws IOException { /****************************** DO NOT FORGET THE DOUBLE SLASHES! ******************************/ /**************** DO NOT FORGET THE DOUBLE SLASHES AT THE END OF THE PATH NAME! ****************/ /*~~ //||||||||||||||||
  11. awitt

    Xslt Sort

    It's actually very difficult to accomplish what you want to do using exclusively XSLT directives. What you can do is use a little bit of JavaScript, though, to make sure that you are only grabbing the top ten results. <script type="text/javascript"> var i=0; var array=new Array(); <xsl:for-each select="..."> <xsl:sort select="substring(dateValue,7,2)" order="descending"/> <xsl:sort select="substring(dateValue,3,2)" order="descending"/> <xsl:sort select="substring(dateValue,1,2)" order="descending"/> array[i] = <xsl:value-of select="dateValu
  12. Anyone interested in a solution to this topic? Follow this topic link!
  13. Alrighty - for those of you who had been following this topic - here's the working code that will let you select a distinct (i.e. unique) set of nodes: <xsl:variable name="unique-list" select="closings/county/announcement[not(@id=following::announcement/@id)]" /> <xsl:for-each select="$unique-list"> var closing1=new closing("<xsl:value-of select="./@id" />", "<xsl:value-of select="../@name" />", "<xsl:value-of select="location" />", "<xsl:value-of select="status" />"); table_for_sc[i]=closing1; i++; </xsl:for-each> Now, a couple things to not
  14. Okay, so I think I'm using it correctly now, but it still produces the duplicate results, and I don't know how it's doing that or how to make this do what i want. <xsl:variable name="unique-list" select="closings/county/announcement[not(@id=following::closings/county/announcement/@id)]" /> <xsl:for-each select="$unique-list"> <tr> <xsl:attribute name="id">row_<xsl:value-of select="./@id" /></xsl:attribute> <td class="county_row"> <xsl:value-of select="../@name" /> </td> <td class="location_ro
  15. Hmm, I tried doing that, but a couple of problems occur:1.) The XSLT engine yells at me - it says, "ERROR: Error in expression closings/county/announcement/@id[not(.=following::@id)]: Unexpected token [@] after axis name; SystemID: ...", which, through a 'lil trial and error, I found meant that the '@' symbol in the brackets and braces ( [not(.=following::@id)] ) had a symbol that wasn't supposed to be there. 2.) Then it transformed, but the resulting html page was devoid of any data from the XML.So, that didn't work, unfortunately. Does it maybe have to do with the fact that we're trying to
  • Create New...