Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. 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.
  2. 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".
  3. 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 .
  4. 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) .
  5. 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.
  6. 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.
  7. 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.
  8. 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>
  9. 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?
  10. 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]
  11. Wow. Never heared of this element before. I learned my lesson here (despite the fact that you were the one asking) .
  12. That's exatly what I meant when I said that I haven't figured out how you can add xsl refernce in the XSLT. If you add it the ordinary way (the way you have done) then it's not the final output that is styled, but the XSLT itself is transformed.The only possible way I can currently think of is to bind a server side script in the XSLT and execute the transformation with a server side script as well. This way, the output should have the final output + the server side "deeds" which in our case is the reference.As for "the way BBC Sport do it", I think they fill the feed manually, considering the xml entension. That is certanly a way you can't go wrong with .
  13. An RSS feed only contains short descriptions about the article, it's name and a link to it. The actual content is held on the site itself. So technically speaking, all "new" thing you need is to learn RSS and post a link to the file on the proper page(s) on your site. Of course, you'll have to update the file when there's a new article. You could automate this process if you write and post your articles through a server side script which adds the proper RSS content to the feed and posts the article (that's what theese "bloggers" are good for).
  14. RSS is actually a plain XML document. By putting a reference to the XSLT file that transforms the custom XML to RSS, you are practically making XML to XML transformation, or in other words: no actual visual information.What I would suggest is to somehow put a reference to another stylesheet in the XSLT file so that it appears in the output (damn it... haven't really figured how is that going to happen).Also, try to check if your <xsl:output> is set to method="xml". If it's "html" or "text" instead, it's quite obvious why you see only plain text.By the way, it would be really good if you could a server side scripting language to generate the actual RSS file. This should make it good for some incufficient RSS readers.
  15. Well, I think that's what the generate-id() function actually is about. I mean, just look at it's example... The only "tricky" think is that you must apply that function where you want the IDs to be used, which in this case means some FO element (I think "basic-link" is the one).
  16. Simply use the <xsl:comment> in the place of the start and end of the XHTML comments.
  17. I agree for the DNS suggestion and like aspnetguy I'm totally against the idea of allowing guests to post. Besides the reasons aspnetguy pointed out, allowing guests to post means a lot of spam, because there's no true bot protection this way. I know few forums that allow guests to post and they were filled with a lot of spam at one point. So they were forced to imply a GOTCHA method if a guest was posting a message and a GOTCHA method when registering. Ugly sight...
  18. After a bit of a struggle, my friend was able to implement this script and even added the feature that the submit button isn't acceable until the form is filled .There was an option I suggested which is probably not going to be useful here, but it's going to be on other parts of the forum where this script is going to be used...Is there a way that when the user clicks on a certain filled field, he would demove the numbers from that field and the ones after? Example:Date 1From 2Subject 3Title 4If I wanted to keep the Date first and From second, but I wanted to alrer the order of the other. I can click "reset" but this would mean I would also have to set the previous options as well. Again I say this not tha much urgent nor at this point usefull. Just a thought .
  19. The reason might have been that you have used/seen the examples with VBScript which because is Microsoft specification is not that well supported in other browsers. Not to mention that IE and FF use different objects to access XML data. Or you might have just tryed data islands? Nevermind...
  20. This doesn't make much difference you know. Sample XMLs are essential in order to see what happens to what. I don't have experience with the xsl:copy element, but I don't think I can't without some kind of proper XML for the XSLT to transform.
  21. Well, my friend said it's not going to work, but he wasn't that final either. He'll see it sometime today. Whatever happens, I'm going to stash this script if don't mind. I like it .
  22. I just happened to have installed myself a new antivirus software, and I decided to test it against the Shields UP! test. I didn't knew the link so I went to the web security page. Imagine my surprise when I realized the link to the Shields UP! test is not there anymore. After I made a search, I found Google's cached page which did had the link.Just to ensure myself, I bookmarked the test. But why did W3Schools removed that link on the first place? Was it some kind of advertisment which the advertiser didn't payed for?
  23. Well, one thing is for sure... if it's possible, the user is going to have to download the needed modules, which is not something that most users would like. Why do you need to use those parsers anyway? MSXML parser is a pretty good one.
  24. You muse specify the encoding in which the non-latin characters are in the XML declaration. See XML encoding for details. Any unicode characters should be able to work. If you want to have non-latin character's in elements' names, you must also ensure that the parser(browser or a server side scripting language) is supporting them. How, I can't tell. I'm used to writing latin element names.
  25. XQuery is wisely popular because it has many features over XPath, but it's not used because it's not a reccomendation yet. The interest in it however is very strong and I think that such GUIs you want to make would be avaiable as soon as browsers support XSLT 2.0 which is going to use XQuery along with XPath to get data from XMLs.As for releasing such an application at this state... it might be good to start it's core but you shouldn't get all the details right, scince the specification isn't even complete. Which reminds me... in order to build such an application, you would need to have a perfect understanding of all XQuery's abilities. In order to learn all abot them, see XQuery's specifications.From what I understand, you want to have what MS Access is to SQL, but to XML instead, right? Well, here comes our second problem. How is the user going to see the results of it's selection? SQL databases are suppose to be tabular, but XML documents are suppose to be plain text. That is something I can't help you with, simply because I'm used to writing XPath expressions "manually".
×
×
  • Create New...