Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. Is there even a language called A++ ?
  2. boen_robot

    A bit confused

    And to answer the other question- No. The information is not included in a database or anything, unless you instruct it to. It's only captured directly, the same way the information from an SQL database is captured and handled directly.
  3. Yes. Every XSLT with it's own XML pal as a pair. Why, does it matter? If only editing one or two variables would be enough, it shouldn't I think.
  4. If you have some sort of markup in the output, you can always use the CSS property text-indent for it, but without markup in the output, I think it's impossible.
  5. Enclose the nested <ul> in a list item, like this: <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li> <ul> <li>3.1</li> <li>3.2</li> <li>3.3</li> </ul> </li></ul> Or better yet, enclose it as a child of the third item to which it belongs to anyway: <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3 <ul> <li>3.1</li> <li>3.2</li> <li>3.3</li> </ul> </li></ul>
  6. The tokenize function seems appropriate. You'll just add a <br /> for each token. However, I don't know where/if it's supported nor what exactly to use as a pattern:
  7. OMG. I didn't saw that one coming. I should have searched before I posted. Sorry .
  8. The way this looks now, it seems impossible.XSLT would need some way that marks a line break like the <br /> in XHTML. I'll see if there's a way, but right now, it seems there isn't. If I don't give a second reply, there truly isn't.
  9. I'm not very experienced at DOM, but what is the documentElement object suppose to do? On W3Schools' refence it says "Returns a reference to the root node of the document". Could it be the thing you need? Or maybe getElementsByTagName("html")?[edit] I can't believe myself. Me, a person with no JavaScript or DOM skills whatsoever, to actually help someone with a DOM problem. Just the thought of it makes me laugh [/edit]
  10. Space between list items? margins and paddings maybe?
  11. The new version of IPB- 2.1.7 has some new features then the old one- 2.0.4. I noticed W3Schools now uses their old template from before the upgrade. However, because of it, some of the new options are virtually unavaiable.For example, when you open a user profile you now need to click "Profile options" in order to see the profile options which were previously in the panel itself. Clicking on it with this template doesn't have an effect though.Another thing is there are sometimes white fields when there should be blue ones.The third example and the thing I personally miss most is the Quick Edit option.I suggest W3Schools restore the original IPB template and rebuild their one on it. If they don't have the time to bother, using the default template won't be such a bad idea either.
  12. If the admins are unactive more then the last backup, then this would mean that they wouldn't be able to restore the forum. That is of course if we suppose they have the right of one backup file at Invisionzone. If they didn't act in a period of a month, this would have meant they would have restored the forum up to the point where it was just hacked. Imagine that.
  13. Unless it's related with this application, I would prefer a new topic. Otherwise, the whole thing might get lost in time.I wouldn't mind building a web site with your help. Considering the zero knowedge of JavaScript which I posses, I might need your help pretty soon . Infact, if you look at the topic for the execution script, you'll see I already do need help. I seem to be unable to use that execution script more then once. I need some way with which I can execute multiple XSLT transformations on a single HTML page. This is also part of the project I'm working on.The big problem for which it's been idle for so long were 2 reasons:1. The server doesn't have PHP and it's not going to.2. Until recently, I was unable to figure out how without PHP am I ever going to be preseting XML in parts. Thanks to you, that's no longer an issue.
  14. Not exactly. XSLT is the bridge from one XML language to another. The reason why XML is suppose to be "interoperable". Because by using XSLT, one XML that one application understands can be converted to another XML which another application understands. In the real world, that's most otfen customXML-to-XHTML transformation. XHTML is the language for the structure, XML alone is the data and XSLT is the glue which binds the data to the structure or any other XML based format (or plain text on that matter).I've seen some pretty weird things done by XSLT which manipulates empty XML files. In other words, it doesn't manipulate them. It just needs them to start doing it's thing. Other applications pass parameters to this XSLT and based on them, it does some unimaginable stuff. Such cases make people (including myself) ask themselves VERY deeply "is XSLT an XML based programming language?". I mean... if it could only work with RDBMS' like MySQL, hide it's source code and work with the file system it could start being comprable with PHP and the such. By the way, XSLT 2.0 includes some functions for handling non-XML files, so the thing I'm talking about may not be as distant as I'm thinking.I do agree that XSLT and COBOL are uncomparable though. Not only the markup/non-markup conflict, but also the purpose, the field of use, etc. I was just talking about readability in general.P.S. I know why W3C decided not to add the features I mentioned above.- Supporting MySQL or any other RDBMS' would mean that they are throwing XML away.- W3C creates "royalty free licence" languages and I guess this also implies open sourceness. Also, XSLT is read in the browser. In other words: it's client side thing. The browser needs the source to use the XSLT. Of course, you can hide the source with a server side language, but that's still not XSLT alone.- XSLT is by it's core a convertion language. Dealing with the file system can't be a part of a convertion. Infact, the non-XML files functions I'm talking about refer to text files, detecting existance of files, pointers to files, etc. but not actually edit, save or delete them. Only perform things based on them. And considering it's partial client side nature, imagine if a client can manipulate your server. No, thanks.
  15. OK. Then report it, and also say it's a regression. It would be taken as a priority as long as you supply the code sample and a screenshot to them.
  16. I only gave example with XSLT, because I know it best. I think justsomeguy and aspnetguy could give better examples with non-markup languages such as ASP(.NET) and PHP.By the way, XSLT itself is not about describing structure nor database storage, but that's just a detail...
  17. Some code samples and/or screenshots to illustrate this? If it's a browser bug, I suggest report it to Opera.
  18. I agree for that it's really self describing. But then again, every language could be if you understand it and name your variables properly. For example: <xsl:for-each select="item"><xsl:copy-of select="price" /></xsl:for-each> It's pretty darn easy to understand that the price of each item will be copied. Infact, I showed a similar piece of code to a friend who happens to be an admin of a site with tutorials about various things. He's a PHP guru and recently learned XML, but has never seen XSLT code before. When he saw it, he was like "When are you going to write something about XSLT?".But nevertheless, COBOL is readable. If my above example was like forEach item createCopyOf price it would have been more readable.If you now tell me that I've just written something in COBOL without knowing, I would be truly amazed .
  19. Maybe if both times are in their own variables and you then compare those vairables... <xsl:variable name="time1" select="MainRoot/Time_1"/><xsl:variable name="new-time1"><xsl:value-of select="translate($time,:-. ,)"/></xsl:variable><xsl:variable name="time2" select="MainRoot/Track/Element/Time_2"/><xsl:variable name="new-time2"><xsl:value-of select="translate($time2,:-. ,)"/></xsl:variable><xsl:if test="new-time1 < new-time2">...</xsl:if> Of course, that's just a concept. Comparing large amounts of dates would requre something just a bit more creative.
  20. Oh, I see. Sorry. Well, it seems this is generated for the cases where the <category> element is not present.If you want to have something like "Unknown category" identfier, you should use something like: <xsl:for-each select="/rss/channel/item[not(category = preceding-sibling::item/category)]"> <xsl:sort select="category" data-type="text" order="ascending"/> <td bordercolor="#FFFFFF" width="200" valign="top" align="left"> <xsl:choose><xsl:when test="category"><a class="testo" href="shopping_cat.asp?Cat={category}"><b><xsl:value-of select="category"/></b></a></xsl:when><xsl:otherwise><a class="testo" href="shopping_cat.asp?Cat=~Unknown"><b>~Uknown~</b></a></xsl:otherwise></xsl:choose>[ ] <br/> </td> <xsl:if test="position() mod 1 = 0"> <!-- Blocco CDATA assieme a codice Javascript --> <script> <![CDATA[document.write("</tr><tr>");]]> </script> <!-- FINE Blocco CDATA assieme a codice Javascript --> </xsl:if> </xsl:for-each> And to eliminate the articles with unknown category, just use <xsl:if> instead.I can already think of a lot more elegant solution then this one, but considering the bad state of this code (tables, weird scripts, etc.) I would prefer to keep it in my own bag'o'tricks.
  21. I think the translate() function can search&replace characters, so something like: <xsl:variable name="time" select="MainRoot/Time_1"/><xsl:value-of select="translate($time,:-. ,)"/> might help with that.
  22. Yeah yeah. It does .Unfortunatly, it doesn't work if the XSLT is firstly called in HTML with the link I gave earlier. And the original application I needed the JavaScript solution on the first place used it. Oh well... in the worse scenario, I'll build the whole site on XML and XSLT only. No bad at it .
  23. Kind'a impossible. As the tutorial said, XQuery is not a W3C standart yet. Because of that, there aren't many implementations yet. The one I know of is the XSLT 2.0 processor Saxon which also supports XQuery in the place of the select statemenets. It's avaiable for ASP.NET and JAVA.
  24. It's this portion: <xsl:for-each select="/rss/channel/item[not(category = preceding-sibling::item/category)]"> <xsl:sort select="category" data-type="text" order="ascending"/> <td bordercolor="#FFFFFF" width="200" valign="top" align="left"> <a class="testo" href="shopping_cat.asp?Cat={category}"><b><xsl:value-of select="category"/></b></a> [ ] <br/> </td> <xsl:if test="position() mod 1 = 0"> <!-- Blocco CDATA assieme a codice Javascript --> <script> <![CDATA[document.write("</tr><tr>");]]> </script> <!-- FINE Blocco CDATA assieme a codice Javascript --> </xsl:if> </xsl:for-each> You can clearly see the "[ ]" for yourself there. Simply remove them and you won't see them. But really, why do you bother with this XSLT? The paging one is so much fun.
  25. I seem to be missing something perhaps... The file page.js in the same directory as all of the files. It contains exactly what you showed without even a single alteration.In the XSLT, I changed the localLinkBefore and localLinkAfter parameters to this: <xsl:param name="localLinkBefore" select="'java script:changePage('"/> <xsl:param name="localLinkAfter" select="');'"/> and also, the root template now looks like this: <xsl:template match="/"> <html> <head> <style type="text/css"> .paginationNavigation, .paginationNavigation ul {text-align: center; margin: 0 auto; padding: 0;} .paginationNavigation ul, .paginationNavigation ul li {display: inline;} .paginationNavigation span, .paginationNavigation a {padding: 10px;} </style> <script type="text/javascript" src="page.js"></script> </head> <body> <xsl:apply-templates /> </body> </html> </xsl:template> The whole thing shows with no errors and the link's href is generated as expected. If typed directy, it would have looked like: <a href="java script:changePage(2);">Next</a> When I click on it however, nothing happens. Only a blink. As if the JavaScript accepts the parameter but doesn't do anything with it.I'm using IE7 and FF 1.5.0.6 and Opera 9 as test browsers.using "java script:changePage(2);" (notice the space) causes error 403 forbidden. What am I doing wrong?[edit] Solved. I just renamed "pagenumber" to "pageNumber" as it should be called .[/edit]
×
×
  • Create New...