1. Introductory Post + Question

    Date: 03/22/06 (Javascript Community)    Keywords: programming, browser, html, xml, java, microsoft

    I'm writing a bit of Javascript (not quite a total newbie but gosh-darn close, though I have experience in other programming languages) to display some XML transformed by XSL. I've created the files to do this and if I use them seperately (sans Javascript), it displays just fine. And that's fine for browsers that have that capability and can handle that without issues, but I'd like to see if I couldn't increase its compatibility a bit by using (drum-roll) Javascript.

    Here's the contents of the two files. All of the info is completely made up.

    employees.xml contains:


     
      MAIL,PHONE,EMPLOYEE_NUM,MARRIED)>
     
     
     
     
     
     
     
     
    ]>

       EMPLOYEES
       
          John
          Rountree
          213-13-1512
          02-03-2006
          jr@newbieworld.com
          5556200922
          00000128
          No
       

       
          Larry
          Becker
          252-43-1321
          02-15-2003
          lb@newbieworld.com
          5556202435
          00000025
          Yes
       

       
          Alison
          Rountree
          323-54-9992
          11-07-2001
          lr@newbieworld.com
          5556204222
          00000005
          Yes
       

       
          Catrina
          Becker
          442-22-9929
          02-01-2006
          jb@newbieworld.com
          5556203432
          00000123
          Yes
       

       
          Edward
          Newbourne
          123-45-6789
          12-25-2004
          en@newbieworld.com
          5556204356
          00000075
          No
       

       
          Dana
          Newbourne
          211-53-1212
          02-03-2002
          jn@newbieworld.com
          5554350922
          00000032
          Yes
       

       
          Cassandra
          Porter
          755-42-2312
          07-25-2003
          cp@newbieworld.com
          5556201922
          00000056
          No
       

       
          Pamela
          Jackson
          232-47-7568
          04-32-2005
          pj@newbieworld.com
          5556208822
          00000110
          No
       

       
          Jess
          Tucker
          213-56-8695
          08-11-2004
          jt@newbieworld.com
          5556207882
          00000100
          No
       

       
          Kimberly
          Jones
          987-99-1232
          02-01-2006
          kj@newbieworld.com
          5556207892
          00000124
          Yes
       



    employees.xsl contains:


    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

     
     
       

    Newbie World Inc. Employees


       
       
         
         
         
         
         
         
         
         
       
       
       
       
       

         
         
         
         
         
         
         
         
       
       
       
    First NameLast NameSSNDate Of HireEmailPhoneEmployee #Married?

     

     





    And finally employees.html contains:



    Newbie Incorporated Employee Roster













    Don't be afraid to let the newbie have it. I'm trying to learn here, but I've been grinding my wheels on this one and I thought it worth asking about.

    Source: http://community.livejournal.com/javascript/97239.html

  2. XSL

    Date: 03/24/06 (Web Development)    Keywords: xml

    I've got a question about XSL. I currently have it turn one XML document into another XML document to make sure the first one passes all requirements of the template. It removes empty tags (ie, ) - the spec clearly says it will do so when using - but I would like to keep them. Is there a way to keep these tags?

    Source: http://community.livejournal.com/webdev/309421.html

  3. redirecting a missing file without using .htaccess

    Date: 03/27/06 (WebDesign)    Keywords: php, xml, web

    So for the website I work on, a new blog is up that replaces the old one. Some outside-my-control websites previously referenced the atom.xml file on the old website, but since the address for the new atom.xml is totally different, i want all the people trying to reference the old xml file to be redirected to the new one instead. the only major problem is that because i'm using Y!SB (ps: boo), i can't use any .htaccess files.

    when i wanted to redirect something before, i would use some php (http://mag1.olivesoftware.com/ActiveMagazine/welcome/plm/plenty.asp");?>), but since i'm now trying to redirect an xml file and not a php one, i sadly can't do that.

    so how do i redirect something while being unable to use .htaccess?

    Source: http://community.livejournal.com/webdesign/1085307.html

  4. AJAX, SQL and PHP question

    Date: 04/05/06 (PHP Community)    Keywords: php, xml, database, asp, sql, java

    Hi guys,
    I was just fooling around with AJAX for the first time and it's working fine so far, but of course some problems are around.

    My question is, is there some possibility to insert PHP code in Javascript?
    I have my JavaScript file, and now I need to tell it somehow which ID to select from the database.

    function showFan(str) {
    var url="getFans.php?id=" + Math.random() + "&q=" + str
    xmlHttp=GetXmlHttpObject(stateChanged)
    xmlHttp.open("GET", url , true)
    xmlHttp.send(null)
    }

    The second line is the one that bothers me. There should be the SQL table variable after the id=, like this; getFans.php?id=$country. The +Math.random() stuff is from the tutorial, no idea what it does, and the rest of the line is also from the tutorial, they used ASP there but I have no clue about asp. So can anyone help me out with and and tell me what PHP code I need to have in my getFans.php in order to make this work? My getFans.php is just a file with the usual database connections and printing stuff, nothing else.

    Thanks is advance :)

    Source: http://community.livejournal.com/php/434515.html

  5. xpath not working, subscription to mailing lists weirdness

    Date: 04/09/06 (PHP Community)    Keywords: php, html, xml, web, linux, spam, apache

    Hi there.

    I'm trying to load an XHTML file as a DOMDocument, and get its text using xpath to find the node. Something's going wrong somewhere, but I can't figure out what.<br /><br /><a name="cutid1"></a><br />I've used xpath a number of times before, from xslt (Xalan and MSXML2) and C++ (libxml2, Xerces and MSXML2), so I thought I had a good idea of what I was doing. The test case I've got this down to (from reading the PHP docs for <a href="/go.php?http://uk.php.net/manual/en/print/function.dom-domxpath-evaluate.php">DOMXPath->evaluate()</a> and <a href="/go.php?http://uk.php.net/manual/en/print/function.dom-domxpath-query.php">DOMXPath->query()</a> is pretty short.<br /><br />The first file is pretty simple - it's just the data file for the second one to load.<br /><br /><b>page1.php</b><br /><pre> <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <shtml xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Title

    Body



    The second is the one that does the work.

    page2.php
    
    
    
    
    Home page.
    
    
    query($path, $context);
    
            $obj = new ReflectionObject($list);
            print("

    Search from \"" . $context->nodeName . "\" for \"" . $path . "\" (" . $obj->getName() . ")

    \n"); print("
      \n"); for ($i = 0; $i < $list->length; ++$i) { print("
    • " . $list->item($i)->nodeName . "
    • \n"); } print("
    \n"); } $dom = new DOMDocument(); $dom->load("page1.php"); print("

    Document Element node name: " . $dom->documentElement->nodeName . "

    \n"); pathsearch($dom, $dom, "/html/head/title"); pathsearch($dom, $dom, "/"); pathsearch($dom, $dom->documentElement, "/"); pathsearch($dom, $dom, "/*"); pathsearch($dom, $dom, "/html"); pathsearch($dom, $dom, "//html"); pathsearch($dom, $dom->documentElement, "."); pathsearch($dom, $dom->documentElement, "./*"); pathsearch($dom, $dom->documentElement, "./head"); pathsearch($dom, $dom->documentElement, ".//head"); pathsearch($dom, $dom->documentElement, ".//head/*"); pathsearch($dom, $dom->documentElement, ".//head/title"); pathsearch($dom, $dom->documentElement, ".//head//title"); ?>


    I get an empty nodelist for the first pathsearch(), which is the one I'm looking for.

    The second and third calls to pathsearch() check that I can actually access the root node, and get a non-empty list, as expected.

    Call 4 ("/*") finds "html", but 5 and 6 ("/html" and "//html") find nothing. An empty result for "//html" is very odd, considering "/*" finds an "html" node.

    Calls 7-13 try finding other nodes starting from the documentElement() (/html) just in case it doesn't like calling without a context. Of these, only 7 and 8 ("." and "./*") succeed with non-empty results. However the results I get are exactly what I'd expect ("html" and {"head", "body"} respectively) which leaves me even more confused as to why all the others are failing.

    Any help here would be appreciated. Even just reproducing my results would be good, so I know it's not just my setup that's b0rked.

    (I'm running php 5.1.2 with libxml 2.6.23 on apache 2.0.55 on linux 2.6.15. More system info can be provided if necessary)


    I originally tried to subscribe to the php-general mailing list to ask this question there, but haven't been able to, and have had no reply from php-list-admin@lists.php.net or postmaster@lists.php.net.


    I've sent a couple of requests, both from the website and via email, to subscribe to php-general@lists.php.net. Each time I've got the "confirm subscribe to php-general@lists.php.net" reply and replied to it. Each time, I've replied using both of the methods they suggest, but have received nothing since. No "welcome to the list" message, no list messages, no bounces, nothing. I've checked by spam folder, and it's not getting filed there.

    So, I tried emailing php-list-admin@lists.php.net which is supposedly staffed by people. I did that on March 31 and again on April 4. Nothing. No replies, no bounces, nothing.

    So, on April 7 I tried emailing postmaster@lists.php.net. Again nothing.

    Does anyone know WTF is going on over there? Why the hell don't they answer their goddamn email? I've been polite, and I've asked just for some kind of reply to let me know that someone is at least reading my messages. Even a "We're not going to help you" would be more useful that goddamn silence.

    So, does anyone else know if they are just a bunch of useless fucktards, or what?

    Source: http://community.livejournal.com/php/436121.html

  6. Flooded with XML: Stemming the tide

    Date: 04/27/06 (Security)    Keywords: xml

    Commentary--As XML traffic grows, Reactivity's Andrew Nash says take steps now to keep it under control in the new network environment.

    Source: http://news.zdnet.com/2100-1009_22-6065808.html

  7. ISO approval 'unlikely for Microsoft Open XML'

    Date: 05/16/06 (Application Development)    Keywords: xml, microsoft

    ISO approval of OpenDocument will thwart standards-group certification of Microsoft's XML document, research firm says.

    Source: http://news.zdnet.com/2100-9593_22-6072695.html

  8. Enumeration conversion

    Date: 05/22/06 (C Sharp)    Keywords: xml

    I'm trying to utilize the System.Drawing.Drawing2D.HatchStyle enumeration in order to define a Brush type. The thing is, I need this to be dynamic in that I want to be able to change the HatchStyle changing a value in an XML file.

    The XML looks somewhat like this:

    System.Drawing.Drawing2D.HatchStyle.Weave



    Anyway, I get the HatchStyle node but I can't get it to explicitly convert to the right type.

    This is how I thought it would work:

    System.Drawing.Drawing2D.HatchStyle objHatchStyle = (System.Drawing.Drawing2D.HatchStyle)Stylenode.InnerText;


    but the line fails stating that it can't convert from type string to type HatchStyle.

    Any ideas?

    Source: http://community.livejournal.com/csharp/62496.html

  9. zmlc 1.0

    Date: 05/25/06 (C Sharp)    Keywords: software, html, xml

    I just finished the beta of ZMLC, which can be located at:
    http://www.mathgladiator.com/jeff/code.html

    In a nutshell, the software lets me (and anyone that wishes) to define an object model in one large file. This file is compiled to produce C++ headers, serialization code to and from XMLjr, and serialization code to and from flat binary. Furthermore, a C# class library is built with the same behavior (except for binary serialization). My goal was to create a C# scene editor for a C++ scene graph that evolves constantly.

    Anyone want to beta test?

    Source: http://community.livejournal.com/csharp/62921.html

  10. Software already installed? (No!)

    Date: 05/25/06 (SQL Server)    Keywords: software, xml, database, sql, microsoft

    Okay. So I've been trying to install SQL Server 2005 for about a month now, on and off. I keep running into the usual problems. My boss wants it installed now now now, so this time I went whole hog. I uninstalled everything remotely Microsoft (including all versions of Visual Studio, all versions of the .NET framework, Office, and a bunch of little add-ons I assumed went to Visual Studio, like WSE and the XML parsers) from the machine. I physically deleted every file I could from the C:\Program Files\Microsoft SQL Server directory. (instapi.dll, from the Microsoft SQL Server\90 directory could not be deleted, no matter what I did, but everything else went away). I try to install, and when I get to the point where it's actually going to install the software< I get the following dialog box:

    The following components that you chose to install are already installed on the machine. To view a report of available options and alternatives click on Details.
    SQL Server Database Services 9.00.1309.06
    Analysis Services 9.00.1309.06
    Reporting Services 9.00.852
    Notification Services 9.00.852
    Integration Services 9.00.852
    Workstation Components, Books Online, and development tools 9.00.852

    Each of these has a checkbox next to it, but all the checkboxes are blank. When I hit Next, I get the following dialog box:
    None of the selected features can be installed or upgraded. Setup cannot proceed since no effective change can be made to the machine. To continue, click Back and select features to install.

    Now, I know the physical fiels aren't there, since I uninstalled the software and then deleted any artifactas, so the problem must be that there are some stray registry keys telling the install procedure that the software still exists on the machine. Does anyone have a comprehensive list of registry keys written by SQL Server 2005, so I can make sure everything is gone before I try this again?

    Source: http://community.livejournal.com/sqlserver/48457.html

  11. altering title within body ?

    Date: 05/30/06 (PHP Community)    Keywords: php, xml, java

    Was talking to a fellow programmer today at work and he was saying that there is a function or routine in PHP to alter a title of a page in an include file that has been called AFTER the head tag. But of course, he couldn't remember right off hand how to do it. I wouldn't doubt there's a way to do it though I thought PHP works asynchronously. But maybe not with output (???). This isn't the first time I've heard of it being done. But such a routine would be quite useful when using PHP as a page template with include files (not that that's common or anything ;)

    Generally in the past I've just used but if there's a way to do it within PHP alone, could someone put up such an example or explain how it's done?

    There's a lot of circumstances where it's not just convienent to set all page content in variables, call an include before output then shuffle them into place within different places on the page. I know about the xml_set_processing_instruction()/eval() design and using XML but in many cases that's more work than simply calling a short javascript tag (call me lazy).

    Any enlightenment welcome :)

    Source: http://community.livejournal.com/php/454565.html

  12. [solved] Issues with streaming PHP/AJAX (using iframes)

    Date: 05/30/06 (PHP Community)    Keywords: php, html, xml, java

    This issue has been solved to a satisfactory level. Working example here.

    Hey folks. I've been attempting to replace some AJAX stuff that refreshed every X milliseconds using the XMLHTTP object, with a streaming equivalent using inline frames and PHP delays. However, i've hit a snag in that data seems to be sent out in 4kb chunks - far too large for my intended purpose.

    While this streaming example is fine providing that 4096 bytes of data is sent between each portion, this dosen't go very far towards increasing consecutive update speed and efficency (by preventing the constant cycle of connect-download-disconnect). I am aiming to only send out about 512 bytes from the server, per portion. I have yet to work out if the 4kb limit is being implemented by the client or the server.

    So basically what I want to do is be able to have the code below work without needing 4kb of useless padding.

    This code is not currently Moz/FF compatible, due to an issue with the way I move the content from the iframe with javascript (window.frames["streaming_iframe"].document.body.innerText returns "undefined" in FF).

    header("Cache-Control: no-cache, must-revalidate");

    echo "";

      if (@$_GET["stream"]) {
      
        for ($i=0;$i<10;$i++) {
            
          for ($x=0; $x<(1024 * 4); $x++) { //4kb chunks seem favoured?
          echo " "; // Padding
          }
          
        echo $i."\n\r";
        usleep(500000);
        }
      
    echo "
    ";

      exit;
      }
    ?>








    Solution:
    Inital padding with echo str_pad('',256)."\n"; (I feel that 256 bytes is an acceptable level of padding)
    Output flushinf with flush(); ob_flush();

    Code (for possible future reference):
    header("Cache-Control: no-cache, must-revalidate");

    echo "";

    if (@$_GET["stream"]) {
    echo str_pad('',256)."\n";

    for ($i=0;$i<10;$i++) {
    echo $i."\n\r";
    flush();
    ob_flush();
    usleep(500000);
    }

    echo "
    ";
    exit;
    }

    ?>





    Source: http://community.livejournal.com/php/454188.html

  13. .ASMX

    Date: 05/31/06 (Asp Dot Net)    Keywords: software, xml, database

    I’ve been challenged at my work to develop something on the order of a mobile helpdesk.
    We run clientele as our helpdesk software, not that it’s important but it’s pretty popular.
    Also my department just got new Windows Mobile devices and I’m been exploring different ways to use them and I’m looking into being able to view a database remotely.
    Is it possible to extend a database view with ASMX is that what ASMX does, or should I be looking at straight XML for just simply viewing a remote database table.

    Source: http://community.livejournal.com/aspdotnet/69025.html

  14. domxml functions not recognized

    Date: 06/06/06 (PHP Community)    Keywords: php, xml

    First time on this server, last night I tried

    $doc = domxml_new_doc()

    Got a function undefined error. Apparently domxml isn't installed by default on PHP 5? I thought it was.

    I did phpinfo and I do lave libxml2 installed, it also says that XML is enabled. But what was really wierd is that no configure command came up on phpinfo. Is everything handled through php.ini on PHP 5??? Me confused. Nowhere could I find a file that has my install configuration.

    Give me the tools and I can code, make me install this crap and I get the urge to go out and kill a penguin. Grrr.

    Any ideas?

    Source: http://community.livejournal.com/php/457852.html

  15. Top 10 Java SE 6 Features

    Date: 06/18/06 (Java Web)    Keywords: xml, web, apache

    Web Services You get first-class support for writing XML web service client applications (death of Apache Axis). No more messing with the plumbing (unless you really want to). You can also expose your APIs as .NET interoperable web services with a simple annotation. For developers who want to handle XML directly Mustang adds new parsing and [...]

    Source: http://blog.taragana.com/index.php/archive/top-10-java-se-6-features/

  16. cURL support/check

    Date: 06/23/06 (PHP Community)    Keywords: rss, xml

    i'm using cURL for the first time and just want to make sure i'm doing it right, i'm using it to grab an rss feed for processing.



    any help would be greatly appreciated, since this is my first time ever touching cURL

    Source: http://community.livejournal.com/php/464511.html

  17. author-specific RSS feed?

    Date: 06/30/06 (WebDesign)    Keywords: rss, xml

    so i'm using movable type for some stuff, and the RSS feed i have right now displays entries written by all the authors. is there a way to make an xml file that only shows the stuff from one author? if it helps any, they do have individual pages where only their entries are shown (using the MTEntries author=X field).

    Source: http://community.livejournal.com/webdesign/1132511.html

  18. Solving - “A pseudo attribute name is expected” Error in JAXP

    Date: 07/06/06 (Java Web)    Keywords: xml, java, google

    I was writing a xml data reader in Java using JDK’s inbuilt XML processing libraries (JAXP) when I persistently hit across this annoying exception with error message: A pseudo attribute name is expected. The error is displayed on the first line itself. Google search wasn’t of much help. I tried few suggestions, which were not of [...]

    Source: http://blog.taragana.com/index.php/archive/solving-a-pseudo-attribute-name-is-expected-error-in-jaxp/

  19. Here's one for ya..

    Date: 07/12/06 (PHP Community)    Keywords: php, xml

    I'll *try* to make this short and sweet without getting into too much gory detail.

    I'm working on some Flash games (as best I can call them). Player results stay recorded in an XML file which is written and modified by PHP scripts, called by Flash when game results are in. The method Flash uses to send this data to PHP is via GET or POST. Upon receiving the data, the PHP script reads and writes to an XML file that's been reserved for that user. Easy enough so far. No worries. Got that mastered. But here's the trick...

    A script to access this PHP script must be in a visible directory in order for Flash to call it. In watered down terms, the user is calling it via Flash. But obviously I can't allow a user to DIRECTLY invoke the script. So how the heck can one decipher between Flash appropriately calling the script or a user trying to directly invoke what is basically the "gateway" to their stored XML info? I don't care so much as whether a user was able to see the XML, I just don't want illegal ability to write to it!

    Unlike my past encounters wish such issues, I don't believe there's an environmental variable to assist. For instance, HTTP_REFERER (which you shouldn't depend on anyway) has a null value when Flash invokes these scripts (hence one of the reasons it's not reliable. LOL)

    I'm sure this type of issue has been resolved somehow. But I can't seem to find any solutions online. Or maybe I'm trying to tackle this is a completely wrong way? Anyone ever had to deal with a similar issue?

    The only thought I've had is somehow coming up with some kind of scrambled identifier that PHP can send to flash at the beginning of the script that is then translated before any send() data is given to the PHP XML writing script. But those can easily be hacked through id comparisons if one is so inclined to use a packet sniffer :)

    Source: http://community.livejournal.com/php/469422.html

  20. VB9 and C#3

    Date: 07/18/06 (Asp Dot Net)    Keywords: xml

    I have briefly examined language specifications for VB9 and C#3. I am correct to think that only VB9 has Deep XML Support, Nested Extension Methods, Nullable Types, Relaxed Delegates, Strong “Duck Typing”? Also, it is the case that only C#3 has Lambda expressions, Implicitly Typed Arrays, and Expression Trees?

    Source: http://community.livejournal.com/aspdotnet/72858.html

Previous page  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home