Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. CDATA displays what you show as it is. That's why JavaScripts in XML files are enclosed by CDATA sections- you keep the exact same characters, therefore use the script and you don't interfere with the parser.Show the full "broken" code please. I don't see a problem.[edit] A closer examination... When you write something like "<hr />" inside an XML element, it's treated as an XML element. Using "<hr />" instead returns the charaters "<" and ">" in the place of the entity codes, so therefore you get litteral the litteral text "<hr />". Using "<![CDATA[<hr />]]>" means that the parser shows litterly what's inside the CDATA section, which in our case is again the plain text <hr />. However, that doesn't mean that the special characters in CDATA were transformed to entites. They were just displayed on the screen as one whole (copy and paste or so to say) the same way as "<![CDATA[<hr />]]>" would have resulted in the litteral text "<hr />" .[/edit]
  2. Wouldn't a simple link to the original do the trick?
  3. boen_robot

    CSS Documents

    Do you mean the official W3C's CSS2 specification, W3Schools' CSS reference or something else?
  4. Find this line in apache's configuration file: DefaultType text/plain And change it to DefaultType text/html Now you're free to remove the extensions of all of your files. When the user typeswww.bhuratea.com/productshe would get that file and the browser is going to display it as HTML. To ensure slash compatability, you should keep the folder too With a copy of the file there.Note that every other file with unknown MIME type and/or file extension is going to be interpreted as HTML, so be careful.There is a way to achieving this more gracefully, but I don't have that much experience with server configuration so I can't figure it out.
  5. You may only do that if you have rights to the servers configuration. If the server is Apache, you may be able to use .htaccess file to make the requred changes. Infact, if you have rights to the server, your index files are not suppose to always be called index.html. You may specify another index name.Currently you see the final slash because products is folder, not a file named "products". It shouldn't concern you though. If the user types "products" with or without the slash, (s)he is going to get the exact same page anyway just as easy.As for how to do it with the .htaccess file, I don't know, but I'm sure there's a way.
  6. I think you've got the speeding correctly, but what about the cache itself? I can't figure out how is the server going to know when to use the server side code and when not, and isn't this kind of check slow by itself?If there is an explainable and proven answer to this (in other words: if my question is stupid), please tell me at least in PM .
  7. A small correction on raimo's post: the <b> and <i> tags, as well as the <u> tag and some other are already deprecated in XHTML's strict doctype. Scince XHTML 1.1 and future versions would come only in strict doctypes, we say those tags are deprecated already.The presentational attributes (like blogsmith's font-weight attribute) are also unavaiable for those strict doctypes.
  8. I suggest ideally to learn PHP as it's very supported. However, your project does sound like a gallery, so instead of building your own, you should first get some open source gallery and study it's source code at first. Add a few features of your own later on, and when you have the mind and skills to develop a better architecture: start creating your own gallery engine.
  9. boen_robot

    XML to JSP

    Actually, from what I understand, he would like to execute the XSLT transformation which I gave him in this topic with JSP, simmilarly to the ASP example on the site. Correct? Or maybe check the answers with JSP?
  10. boen_robot

    Colours

    What are you talking about? In paint go to Colors\Edit Colors...\Define Custom Colors>>. On the most right part of the windows You'll see three fields: Red, Green and Blue. Where is the yellow color you speak of? Maybe some really old version of paint?
  11. This would have been useful if there was a way to disable certain functions of PHP though .
  12. A friend of mine sarcastly would say "A person must suffer and struggle, so he could know the next time" . I would say in simmilar manner that they use it because it's hard, thus considered a privilage if you're able to code in it.[edit] Phahaha. Nice analogy . Well, you'll still be considered "one of a kind" if you could do that you know .[/edit]
  13. I must say I now feel both as a noob and a guru. A noob for my previous statement that insterting invalid code is like a holy grail. Guru, for discovering that holy grail . It's an element I avoid using. Who would have though how life saving <xsl:text> could be?!?! <?xml version="1.0" encoding="windows-1251"?><!-- DWXMLSource="dictonary.xml" --><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> <!ENTITY copy "©"> <!ENTITY reg "®"> <!ENTITY trade "™"> <!ENTITY mdash "—"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY pound "£"> <!ENTITY yen "¥"> <!ENTITY euro "€">]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" encoding="windows-1251"doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/><xsl:template match="/Dictionary"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"/><title>Untitled Document</title><style type="text/css">td {border: 1px solid #000000;}tr {border: 1px solid #FF0000;}.PinYin {text-align: right;}.Chinese {text-align: left;}</style></head><body><table><xsl:for-each select="Word"><xsl:variable name="columns">4</xsl:variable> <xsl:if test="position() mod $columns=1"> <xsl:text disable-output-escaping="yes"><tr></xsl:text> </xsl:if> <td> <span class="{local-name(Chinese)}"><xsl:value-of select="Chinese"/></span> <span class="{local-name(PinYin)}"><xsl:value-of select="PinYin"/></span> </td> <xsl:if test="position() mod $columns=0"> <xsl:text disable-output-escaping="yes"></tr></xsl:text> </xsl:if></xsl:for-each></table></body></html></xsl:template></xsl:stylesheet> Produces completely valid code . The only problem is that if ran directly by Firefox or Opera 9 Build 8219, you see plain text instead. That's actually a wrong behaviour I think, but still. If you parse it on the server side, it displays and comes valid in all browsers.Note that I've used the XML I provided in my second last post.Does anyone know how could I (or you by yourself) report this to both Opera and Mozilla?[edit]Reported to both Mozilla and Opera. Opera doesn't say anything yet It turned out Opera had a newer bild (8367) which now supports disable-output-escaping and as for Mozilla, this issue turned out to be a very frequently reported one and they don't intend on fixing it. See bug 98168 for details. In the mean time, I found another solution in the bug itself. Someone posted a "challenge" for the exact same idea here and one person was able to solve the issue. Here's the solution, adopted for this XML of course: <?xml version="1.0" encoding="windows-1251"?><!-- DWXMLSource="dictonary.xml" --><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> <!ENTITY copy "©"> <!ENTITY reg "®"> <!ENTITY trade "™"> <!ENTITY mdash "—"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY pound "£"> <!ENTITY yen "¥"> <!ENTITY euro "€">]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" encoding="windows-1251"doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/><xsl:param name="group-size" select="4" /><xsl:template match="/Dictionary"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"/> <title>Untitled Document</title> <style type="text/css"> <xsl:comment> td {border: 1px solid #000000;} tr {border: 1px solid #FF0000;} .Chinese {text-align: left;} .PinYin {text-align: right;} </xsl:comment> </style> </head> <body> <table> <xsl:apply-templates select="Word[(position() mod $group-size) = 1]" /> </table> </body> </html> </xsl:template><xsl:template match="Word"> <tr> <xsl:for-each select=". | following-sibling::Word[position() < $group-size]"> <td> <span class="Chinese"><xsl:value-of select="Chinese" /></span> <span class="PinYin"><xsl:value-of select="PinYin" /></span> </td> </xsl:for-each> </tr> </xsl:template></xsl:stylesheet> Stupid mozilla .[/edit]
  14. It may display it correctly, but as fullphaser points out, it's not a vlid code we're talking about.
  15. Would you please consider continuing your conversation about tables vs CSS and leave this topic alone?
  16. Actually, you could even nowadays use ID for a single element. IDs are threated with a greather priority then classes, so it's simmilar to using the style attribute. However, inline styles are usefull when you don't have full control over the head styles, so yeah. I am wondering too why are they deprecating it now. It's not the moment for such deprecation I think, but still- there is equivalent, so it's not that bad.
  17. There is such thing completed in CSSplay.co.uk. Only the best site for CSS demonstrations .
  18. Get the desired domain name and a host, then install IPB on it. As far as I know ipbfree.com doesn't allow you to backup the forum's database, so you'll have to start all over again.Another solution would be to use a domain redirecter. Register the desired domain and tell it to go to the existing domain I mean.
  19. Sounds like a job for a "web service". You would create a search engine in ASP. A SOAP request from the child domain (created with a child's domain server side scripting file) is given to your central search engine. The search engine perfoms the searches and gives the results as a SOAP response to the child ASP file. The childs accepts the SOAP response, processes it and generates the desired output with the result from the response. The output itself could either be an XML file, or any other file that the child's server side scripting language could generate.
  20. Free hosters usually win with the derictory or subdomain they give you. When a user goes to your site, he/she is sure to see that your site is hosted at their site. He would then go to the main page where the ads are standing. The ads are then doing the work.Well of course they don't interfere. You are paying after all. It's in your right to stop paying them if they do interfere, so they'll never do that as long as you pay and obay the previously given rules if any. If there are any rules, they would rely on abuse reports, not on monitoring.If by "chosen adress" you mean hot linking (getting resources from other domains), it depends. Some hosts don't allow such thing but if they don't they'll let you know it. Most (all?) payed hosts do allow such thing though. Some even offer "hot link protection" which means that unauthorized domains won't be able to adress your resources directly.
  21. Simply use the <object> tag to initiate the media player. Something like: <objectclassid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"><param name="FileName" value="playlist.m3u" /></object> Where playlist m3u must be the playlis with all the files.You can create this playlist by choosing the songs you want and put them in a now playing list at Windows Media Player (I don't know if other players could it nor how they do it). Then select "File>Save Now Playing List As... " In the dialoug box, select the desired format (either wpl or m3u. I don't know their differences), write the desired name above that dropdown menu, select the location on your hard drive and "Save". Upload the newly created file on the same folder where the object tag will be used (in the code case above at least) and that's it.Note that you must play the desired music files from the server, or you'll create local paths.
  22. I don't know about multiple files, but I think you may load some playlist (m3u was the format I think) which would load all the needed files itself.
  23. OK. I was wrong. I'm guilty as charged . I did saw the one for the img though. Somewhere around this forum I found some FAQ about XHTML's future and the images inside every element (not only p's) is truly something I liked. I mean how cool is to have a media load and a styled text to load on fallback .
  24. boen_robot

    Story page

    That's what Chocolate570 initially suggested, but this would force the whole book to download all at once, instead on pieces, which by itself means longer downloading.
×
×
  • Create New...