Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. Database management really takes time and if your deadline is really soon, there's nothing you can do about it.Notepad is the hard way of making web sites, buy it's probably the best way to learn. Dreamwaver 8 is easy, but one should use it in "coder" mode, not it's WYSIWYG abilities. If you decide to use another editor, it should be a text editor anyway, not a WYSIWYG editor.Visual Basic (VB) and the IDE for it- Visual Studio .NET are not for making web sites. They are for making desktop applications, though one of VS.NET's abilities is a plain HTML editor."SQL" is actually the language differnt databases use for queries, including MS Access. Other database engines include MySQL, MaxDB, MS SQL, Oracle and many others.PHP and ASP(.NET) are probably the most famous server side scripting languages, but know they are not the only ones. There's also Cold Fusion, JSP, Perl and many others. All of them can do everything, including DB communtication, so it's really a matter of preference and environment.
  2. boen_robot

    Welcome

    Speaking of which, shouldn't this topic be deleted already?
  3. Sorry. I had a typo and I missed a "]" just before the quotes: <xsl:for-each select="key('DATA',C[6])"> <tr class="style16"> <xsl:for-each select="C[position() >= 27 and position() <= 35]"> <td class="style16"> <xsl:value-of select="."/></td> </xsl:for-each> </tr> Well, as I said, you could do many things but it really depends on what the complete output looks like and what would be nice for it. For example, one thing you could do is put a list in a single table cell to hold all of the items: <xsl:for-each select="key('DATA',C[6])"> <tr class="style16"> <td class="style16"> <ul> <xsl:for-each select="C[position() >= 27 and position() <= 35]"> <li><xsl:value-of select="."/></li> </xsl:for-each> </ul> </td> </tr> If you could show me what are those cells actually having, I might give you a more sematical code for that.
  4. I was hoping you'll try it. Simply because it's easier with me. As I said, PHP5 has transformToURI() which works perfectly for this case. But I don't have PHP4 to test the above PHP.If the special characters in the $input PHP variable are escaped, you may use <xsl:value-of select="$input" disable-output-escaping="yes"/> in the XSLT to restore the original characters.
  5. Well, I'm not sure, but I think that the both the requrest and response are extensible (in the spirit of XML). You could simply add another element and/or attribute to carry the additional data:Request <soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPrice> <m:StockName>IBM</m:StockName> <m:StockName>MSFT</m:StockName> </m:GetStockPrice> </soap:Body></soap:Envelope> Response <soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPriceResponse> <m:Stock> <m:Price>34.5</m:Price> </m:Stock> <m:Stock> <m:Price>32.5</m:Price> </m:Stock> </m:GetStockPriceResponse> </soap:Body></soap:Envelope>
  6. You need to set the server to rewrite URLs. See the URL rewriting guide for more info. The particular thing you're trying to do is also covered in the AListApart's "URLs! URLs! URLs!" article. The Apache mod_rewrite is truly a piece of art. If you can master all of it's uses (not just the ones shown in those examples), you may practically call yourself an Apache expert .
  7. Just of curiosity. Scince when does "Child" count as a "gender" (hah.. I didn't noticed earlier)?Well, you said yourself that theese aren't the only types, right? Now that aalbetski gave me a good start, I think I could offer you THE solution: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html"/><xsl:template match="/"> <TABLE> <TR> <TD>Gender</TD> <TD>vegetarian</TD> <TD>Non-Vegetarian</TD> <TD>Total</TD> </TR> <xsl:for-each slect="//type"> <TR> <TD><xsl:value-of select="."/></TD> <TD><xsl:value-of select="count(../Person[type=. and vegetarian='True'])" /></TD> <TD><xsl:value-of select="count(../Person[type=. and vegetarian='False'])" /></TD> <TD><xsl:value-of select="count(../Person[type=.])" /></TD> </TR> </xsl:for-each> </TABLE></xsl:template></xsl:stylesheet>
  8. Weird. I always thought that MS SQL is only available for Windows (I would have expected that, scince it's Microsfot's creations).Well, there's a description at PHP.net about MS SQL which shows how to install the requred extension and how to use it. The way I see it, it's almost equivalent to MySQL, but it's another DLL and another prefix before the functions .
  9. Yeah right. In order to view an XML file, I only need to know it's location. If it's encrypted I also need to decode it's data of course.With a database I need to know the server and port the DB is on and I need to know a username and password to use it. If I know this and the data is encrypted, I again need to decrypt it.Scince when does knowledge of a location count as less more secure then a username and password? It really depends on what type of expressions are you comfortable with. I've always prefered//members/phone then SELECT phone FROM members And organization also depends on the individual. I would have a few structured folders of XML files and access them separatly, depending on what I need. This could also help increase performance. XSLT also has a key() function that very closely emulates DB's relations, so that's not that much issue either (IF you manage to master this function, as I yet have to).................On the topic. I strongly suggest that instead of PHP you use XSLT to transform the XML into XHTML. Use PHP only to execute that transformation and show the output to the browser. If you need other server side only features, you could pass the results of those operations as parameters to the XSLT for futher processing.
  10. The only way I can think is using some sort of "AJAX" approach (or should I say simply JavaScript) to refresh only what has to be refreshed.How? I haven't got the slightest clue. Hope someone else does.
  11. Actually it will be http://something.com/something.swf .In order to serve the file as an index file (that is- no need to explicitly point to the file), you do the same thing as you do for other file types: you set the server to use this file as an index:DirecotryIndex something.swf something.xml something.svg something.php something.htm something.html
  12. That's not value-of's fault. It's the <td>'s fault.A <tr> defines a data to be on a single row. A <td> defines a cell on that row. Cells on one row are of course displayed on one row.There are few things you can do here, but it really doesn't involve the XSLT namespace. Only the XHTML it will output.Side note. Instead of repeating value-of 9 times, you could do a ranged selection: <xsl:for-each select="key('DATA',C[6])"> <tr class="style16"> <xsl:for-each select="C[position() >= 27 and postion() <= 35"> <td class="style16"> <xsl:value-of select="."/></td> </xsl:for-each> </tr>
  13. Well, you could also create an XML document and style it with CSS to get an HTML like view and use XLink it it to mimic HTML links.You can also use SVG with or without CSS to get a Flash like view.And no. Unlike Flash, SVG doesn't need to be called from an <object> element or anything, though it could be.
  14. It does, but it really depends on the content itself. white-space: pre makes it so that the result of <div class="preElement">Some contenton more then one line</div> Is rendered in the same way as <pre>Some contenton more then one line</pre> Would be.Apply that class to a non <pre> element that has a text that is on more then one line and you'll see what's the difference with and without it.
  15. And how exactly did you arranged the output in that table? I feel this might requre xsl:key which I'm not so experienced with, so showing how you did it might give me a good start.
  16. You're putting too much PHP into it. That's my whole point.Consider something a bit more simpler: <?php//You generate an XML element with the desired data in it.//Special characters are escaped to avoid non-well formdness.$input = '<img cat="' . htmlspecialchars($_POST['cat']) . '" id="'. htmlspecialchars($_POST['id']) . '" />'//You assign that very same XML element as a parameter to an XSLT transformation.$args = array('input' => $input);//The XML file that will serve the transformation will be the file you want to edit.$xmlfile = "xml.xml";//The XSLT is the one demonstrated above or something similar (I'll look over it if something's wrong)$xslfile = "xsl.xsl";//Initiate the transformation$engine = xslt_create();$output = xslt_process($engine, $xmlfile, $xslfile, NULL, NULL, $args);xslt_free($engine);//Here comes the nasty part.//You don't need to print the output with "print $output" as you normally do.//Instead, first delete the old fileunlink($xmlfile)//Then, create a new file with the output as it's content$handle = fopen($xmlfile, 'w+');if (fwrite($handle, $output) === FALSE) { echo "Cannot create the new file " . $xmlfile; exit; } echo "Success!";fclose($handle);?>
  17. boen_robot

    https

    I don't think so. That's what a login is for (HTTP or HTTPS... doesn't matter): for protecting the content behind it.
  18. Sorry. I guess I got over exited when thinking about this. Consider the following XML as the value of a parameter for the stylesheet above: <name> <first>Bill</first> <last>Gates</last> <notes>click <a href="here.html">here</a></notes></name> and consider this XML as the input for that very same stylesheet: <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body></note> If what I think is right, the result of such transformation shuold be: <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> <name> <first>Bill</first> <last>Gates</last> <notes>click <a href="here.html">here</a></notes> </name></note> Saving this output as a new file or should I say completely owerwritting the previous one would be like an euivalent to editing the XML.
  19. Yup. I think it's the image. Instead of setting the ID to the image, you could also do#the-id img { border: none;}[edit] You're welcome[/edit]
  20. Use CSS "border: none;" instead of the presentaional XHTML attribute.
  21. boen_robot

    List Fixing

    Oh... just... remove the styles for all "li"s (line 39 to 45) and add this right below your "#nav" styles (on line 39), will you?#nav li{ display:block; float:left;}li{ padding:10px;} You'll see the point right after you see the result.
  22. boen_robot

    List Fixing

    #nav is the ID of the div containing the navigational list, not the list item itself. Your style would work for all "li" elements that are descendants of the current one, but not on the current one itself. What's with "inline" in this case anyway? It arranges list items as "plain text", not aligning them vertically as you want.It's just that your current style is aimed at ALL li's. You're applying the navigational list's styles over the product's styles. What I'm suggesting is to simply "isolate" that style to serve only where it's needed. Lists display in a vertical line by default anyway.
  23. boen_robot

    List Fixing

    OOOOOOOUUUU!!!! Why didn't you said that from the start?Well, in just a minute I found two ways for that, but the one I reccomend is turning the "li" selector into "#nav li". You might want to also create another style for all "li"s to carry the padding though. It seemed nice.
  24. Just a thought.... if that feed is a local feed (that is, one that you have control over when it's posting), can't you simply put the backup commands in the scripts that submits the RSS feed? That way, the backup script will be executed every time a data is posted.If we're talking about remote feeds, then I guess you really have to periodically check those sites for updates. That's how Yahoo! and everyone is doing it and I'm not seeing anothe way either.
  25. boen_robot

    restriction base

    A stupid question really, so it may not be related, but why do you import two.xsd twice? I mean, there's once in one.xsd and once in three.xsd. Could that be it?
×
×
  • Create New...