Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. boen_robot

    Story page

    Or simply write each page in it's own file and place a link on each page for the next and previous one (in other words: manually do the things)?
  2. I already told you on the PM you sent me to just create a div around the three colums and center that new div.By the way, I do see another problem with your page. When it first loads, all "pages" on left and right are shown. I have to click a number to get only that number's thing, but it's kind'a useless scince all the content is loaded anyway.
  3. Note that CSS3 is going to have a target replacement. It's listed in the CSS3 target specification. Nowaday browsers don't support it though, so JavaScript is the only valid solution now.Besides the above simplified solution by johneva, you may define your own "classes" of target behaviour and use/alter them all at once by using this script.
  4. I know about the <center> tag and the align="center" attribute. I was refering to the style attribute. I know that external stylsheets are the way to go, but the style attribute (a.k.a. "inline CSS" as it's in the quote) is definetly NOT going to be deprecated.
  5. And where did you learn that lie from? W3C would never deprecate something (the <center> tag in our case) without providing, or at least think of future providings of an alternative. Using inlinde CSS is sometimes crutual to solving global stylesheets problem. I don't think it's going to be deprecated that easily, but if you can give me an official W3C statement, I would believe it. I know that using external stylesheets is cool, but there are reason for inline styles' existense as well.
  6. I did. And I liked it a lot. However, all plug-ang-play server applications, both easyPHP and XAMPP make it hard to install extensions and manage their settings, so I currently don't have it. But for plug-ang-play server application, that is certanly the best choise.
  7. Is XSLT 2.0 even supported in today's browsers ? I thought it's still a candidate reccomendation and nothing yet supports it or at least, not it's features.
  8. That's what me and Vinz said actually. It displays correctly in both browsers, but technically speaking, it's not a valid XHTML output code. This is the only solution which you would have to stick with now, but if you're looking for a valid output, you should try to create something else as well.
  9. Besides the thing already mentioned, there are even more advantages on using CSS layouts instead of tables.Yes. Download times are technically reduced because the positioning data is downloaded once and cached instead of being loaded for every page.Also, tables have to be completely downloaded in order to be displayed while <div>s are displayed immediatly when they are closed (their childs are also displayed when they are closed) which makes the user feel as if the page loads faster while technically speaking tables are downloaded just as quick but only rendered later.There is also the device independence feature of CSS based layouts. You can have multiple CSS stylesheets optimized for different devices. Just imagine how will your favourite site that uses tables would look like on a cell phone for example. It will take you weeks to scroll to the desired part of the page. Using CSS for layout, you can customize the layout for this device while keeping the same XHTML.Accessability basically mens to let the user customize the page while still allowing him to easily use the same functionality and content. With tables, you force single positioning, a lack of logic, etc. and as mentioned, you disable some screen readers to read the content of your site.As for flexibility... it's much easier to see one <div> then to look up the exact coordiates of your content's <td>. When it comes to external CSS stylesheets (the last big paragraph of ben3001's post), that's why W3C's QA suggests that you use semantic class names. So you can clearly see where this belong and what it does, not how it's suppose to look like. Say ".title", not ".BigRedSign" for example.I actually review sites when they use tables and even like some. W3Schools is only the best example of such site. However, I do admit that I like tableless sites A LOT more. It gives a scence of comfort for me as a developer (a strong word for me, but still).By the way, I know this was an expected answer, but hey, it's the truth.
  10. boen_robot

    Modifying xml file

    XML is NOT good for storing passwords, simply because it's not secured. If I know the URL of the file, I can always see it. And if I don't, there are applications which can crawl through all of your site's content and find it. Such applications are only stopped by "forbidden" errors by the server, however such error also stops every other file to access something from that folder, making it useless.Using XSLT alone, you can't do that. With some client side scripting however I think it might be possible, but it's still not secured.Use SQL to store secured information such as passwords and server side scrtipting for manipulation. Keyword: Security.
  11. You can use the document() function and point it at the desired XSLT, however, notice that it's the XSLT that would be looked in for the value, not the output of it.
  12. Is the <xsl:text> really necessary? Shorten yourself a bit. If it is, then sorry. Put it back .As for this problem, I saw someone here that sucseeded in doing what you want with the only difference that he did it with <xsl:element>. I think it should work here as well.What you need to do is to turn the variable into parameter instead and use the string() function to select the parameter. So try using this: <xsl:template match="Foo"> <xsl:element name="xs:element"> <xsl:attribute name="ref"> <xsl:value-of select="Bar"/>:<xsl:value-of select="Bar"/> </xsl:attribute> <xsl:parameter name="bazNamespace"> xmlns:<xsl:value-of select="Bar"/> </xsl:parameter> <xsl:attribute name="{string($bazNamespace)}"> A:B:C:<xsl:value-of select="Bar"/> </xsl:attribute> </xsl:element></xsl:template>
  13. boen_robot

    Ajax

    AJAX by itself is not a new language, but just a term for manipulating XML with JavaScript. If you write a JavaScript that creates an instance of XML document, chooses and displays some parts of XML document, etc. this means you're using AJAX.
  14. Excuse me for saying this without anything more usefull but...OMFG! So simple page and yet use tables for layout?!?! You should REALLY start trying to use tabless layouts before it's too late. Maybe then the things would be A LOT more clear.
  15. Well, the first thing you need to learn with CSS is that it's not supported the same way in IE, Firefox and Opera. Different browsers show the same code with differences, whether big ones or small ones due to the lack of support of some features or a variety of bugs.Of course, in some cases like this one, there are bigger differences to consider.In this particular case, what I can say is that IE doesn't support position:fixed, but Firefox does. I have no idea if the leading zero in ".BannerPurple" makes any differences, but for the sake of strictness, don't use leading zeros.I see you have tryed to set the body's height to 100%. Because of different browser issues, there's a bit more to achieving this in all browsers. Create a div with an id attribute named (for example) wrapper at the top (and close it at the bottom respectivly) and replace body{ height: 100%;} with this: html, body{height: 100%;}*html{height: auto;}#wrapper{height: 100%;} That way, the inner divs should stretch smoothly enough.Try changing theese for starters and then see what new issues you'll have.
  16. That's right. Only the JavaScript needs it. However, if you want to generate a valid markup, you should choose some existing attribute which doesn't do anything anyway. One such example is the "rel" attribute. Another example in this particular case would be to define a class. After all, you aren't obligated to define CSS properties for a class to be valid.And btw, as far as I knew, attributes can't begin with "xml".
  17. The generate-id() function is used more like a temporary self changing variable. It's not meant to be carryed across files as a unique identifier. If you need it in more than one file, you should use it once and include XSL content in other file.I'm not sure I got it all actually. Are all pages of the desired PDF formatted with this XSL-FO? If so, then for the TOC you have to use generate-id() once on the element in the TOC and once in the element it refers to. Note that both arguments must point to the same node. Otherwise, you define another group of IDs.I suggest you don't use <xsl:element> and <xsl:attribute> unless there's no other way. I mean, you can just write <fo:marker marker-class-name="section-title"><xsl:value-of select="title" /></fo:marker> And if the "section-title" needs to vary, you can use <xsl:variable> to define the change: <xsl:variable name="section-title" select="Use this if a single XPath expression is all you need or omit this attribute and open the variable"/><fo:marker marker-class-name="{$section-title}"><xsl:value-of select="title" /></fo:marker> I guess you could put the marker in it's own template and call it with <xsl:call-template /> or <xsl:apply-templates /> in every page of the PDF.Before this goes any further, I must say I'm not a big fen of XSL-FO .
  18. Trying it with Little Goat's code resulted in the script not working at all. I mean even inital clicks on the unfilled fields didn't worked.Anyway, I just remembered that there's also a need for another more essential for user comfort feature. The different PMs are showing to the user with checkboxes which when marked allow the user to delete the message or move it to another folder (very simmilarly to the thing in IPBs PM system). However, we would really like if the submittion button is only avaiable when there's at least one checkbox checked, instead of loading the server with empty requests.So far there's only a code which makes the button appear if the FIRST checkbox is checked function options(id, id2){ var x = document.getElementById(id); var o = document.getElementById(id2); if (o.checked == 1) { x.style.visibility = "visible"; }else{ x.style.visibility = "hidden"; }} However, the idea is to make it so that if ANY checkbox from the particular form is checked, the button would appear. Note that there would be at least two forms on a page (just saying if it would make a difference) .
  19. Unfortunatly, that's too true. I was just able to run Cold Fusion's XSLT processor and with this XML: <?xml version="1.0" encoding="windows-1251"?><?xml-stylesheet type="text/xsl" href="dictionary.xsl"?><Dictionary><Word> <Chinese>A</Chinese> <PinYin>B</PinYin></Word><Word> <Chinese>C</Chinese> <PinYin>D</PinYin></Word><Word> <Chinese>E</Chinese> <PinYin>F</PinYin></Word><Word> <Chinese>G</Chinese> <PinYin>H</PinYin></Word><Word> <Chinese>I</Chinese> <PinYin>J</PinYin></Word><Word> <Chinese>K</Chinese> <PinYin>L</PinYin></Word><Word> <Chinese>M</Chinese> <PinYin>N</PinYin></Word><Word> <Chinese>O</Chinese> <PinYin>P</PinYin></Word><Word> <Chinese>Q</Chinese> <PinYin>R</PinYin></Word><Word> <Chinese>S</Chinese> <PinYin>T</PinYin></Word><Word> <Chinese>U</Chinese> <PinYin>V</PinYin></Word><Word> <Chinese>W</Chinese> <PinYin>X</PinYin></Word><Word> <Chinese>Y</Chinese> <PinYin>Z</PinYin></Word><Word> <Chinese>1</Chinese> <PinYin>2</PinYin></Word><Word> <Chinese>3</Chinese> <PinYin>4</PinYin></Word><Word> <Chinese>5</Chinese> <PinYin>6</PinYin></Word><Word> <Chinese>7</Chinese> <PinYin>8</PinYin></Word><Word> <Chinese>9</Chinese> <PinYin>10</PinYin></Word><Word> <Chinese>11</Chinese> <PinYin>12</PinYin></Word><Word> <Chinese>13</Chinese> <PinYin>14</PinYin></Word></Dictionary> This XSLT <?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;}</style></head><body><table><xsl:apply-templates select="Word" /></table></body></html></xsl:template><xsl:template match="Word"><xsl:for-each select="."> <td> <xsl:value-of select="." /> </td></xsl:for-each><xsl:if test="position() mod 4 = 0" ><tr /></xsl:if></xsl:template></xsl:stylesheet> And this cfm <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=windows-1251" http-equiv="Content-Type" /><title>Untitled Document</title><style type="text/css">td {border: 1px solid #000000;}tr {border: 1px solid #FF0000;}</style><META NAME="ColdFusionMXEdition" CONTENT="ColdFusion DevNet Edition - Not for Production Use."></head><body><table><td xmlns=""> A B</td><td> C D</td><td> E F</td><td> G H</td><td> I J</td><tr></tr><td> K L</td><td> M N</td><td> O P</td><td> Q R</td><td> S T</td><tr></tr><td> U V</td><td> W X</td><td> Y Z</td><td> 1 2</td><td> 3 4</td><tr></tr><td> 5 6</td><td> 7 8</td><td> 9 10</td><td> 11 12</td><td> 13 14</td><tr></tr></table></body></html> As you can see for yourself, it's all invalid.
  20. It seems as you have misinterpreted the term P2P. Even P2P networks have servers. Even torrent networks. In order to get a torrent file, you go to a tracker. You use the torrent file to connect to that tracker which connects you to the owner of the file and also tells other people that you have requested this file, so that they can downoad from you as well. The tracker is a real key figure in all of this.You can't have P2P other then direct one-to-one cable, without some kind of third party connection (either a Proxy, or any kind of other machine specialized for this task). Even if there were browser plug-ins that would turn sites into torrent files, you would still need to upload theese files somewhere. OK. Let's say someone sacrifices few TBs so everyone could be happy. You'll still have to keep those files on your PC or delete them and download them later, thus recreating the torrents, thus recreating the connection.It's all just too unstable to work out so simple. If it was that simple, someone would have done it already.
  21. What you descibe is already possible. However, it's not a browser feature, but a network one. It's known as a Proxy server. That's a machine on your local network which saves the last few MBs (how much exactly is set by the network administrator) and if another person inside that network downloads this page, he/she would download from the Proxy instead.There are however few drawbacks of all this. For starters, you can't disable the Proxy's cache. Because of this, popular pages are practically not going to be updated before they are out of the proxy's cache and for that they must become less popular. You must also specifically tell your every application which uses internet connection that you have a Proxy server. If you don't set it correct or don't set it at all, there won't be any connection.That's infact the reason why most of the times, network admins give the proxy a really small cache and therefore you almost never feel speed boost. Because of all of the above, Proxy servers are not something for everyone. It's infact a really annoying technology most of the times.
  22. I used the generate-id() function at both the questions and answers to create links between them. In order to group the questions' answers, I had to place a name for each group of questions. Using the QuestionNo for each answer seemed as the most appropriate idea . <?xml version="1.0"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" ><xsl:template match="/"> <html> <body><form name="myform" action="http://www.manut.com" method="POST"> <center> <h2> <xsl:value-of select="XMultipleChoice/QuizName" /> </h2> </center> <hr /> <!-- create the links --> <ul> <xsl:for-each select="XMultipleChoice/Units/Unit"> <li> <a href="#{generate-id(Question)}"> <xsl:value-of select="Question" /> </a> </li> </xsl:for-each> </ul> <!-- now the actual slides --> <xsl:for-each select="XMultipleChoice/Units/Unit"> <hr /> <h3> <a> <xsl:attribute name="name"> <xsl:text>#Unit-</xsl:text> <xsl:value-of select="QuestionNo" /> </xsl:attribute> <xsl:value-of select="QuestionNo" /> - <xsl:attribute name="name"> <xsl:text>#Unit-</xsl:text> <xsl:value-of select="Subject" /> </xsl:attribute> <xsl:value-of select="Subject" /> </a> </h3> <li> <h3 id="{generate-id(Question)}"> <xsl:value-of select="Question" /> </h3> </li> <ul> <xsl:for-each select="Answer" > <label for="{generate-id(current())}"> <p align = "left"> <input type="radio" id="{generate-id(current())}" name="{string(../QuestionNo)}" value=""/><xsl:value-of select="." /> </p> </label> </xsl:for-each> </ul> </xsl:for-each> </form> </body> </html></xsl:template></xsl:stylesheet>
  23. Would you provide a sample XML file, so I could test what you have up to now? I mean... it all looks good at first sight, excluding the fact that you have two "name" attributes in a single anchor, which however shouldn't be the cause of this.What if you place each group (question with it's answers) in a <fieldset> element maybe?
  24. SSI (Server Side Include), Framesets... the ways are almost countless, though theese are the most basic ones.SSIs would mean if your host supports PHP, ASP(.NET), Cold Fusion or other server side scripting language, to use that language to include (X)HTML file into another (X)HTML file.Framesets would requre a single file to load that would display one of the files in one frame (let's say the nav bar) and the other (content) in another. But this gives many drawbacks for which most people avoid using frames. For example, the user can't bookmark a specific page on the site by copying the URL in the adress bar. The reason for that is that it's the frameset file which holds the things together, not the page itself.Technically speaking, there's no way of doing multiple XHTML editing in strict mode with or without CSS. There's a need for more.[edit] Huh. Jonas beated me up on this one [/edit]
×
×
  • Create New...