Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. IDs are a thing that you may use only one in a page per elememt. There can't be two elements called "green:yes" in a single XHTML. I also echo mreddy that ":" are probably reserved for pseudo classes though I'm not sure.However, I think you might be able to to the following: h1#green:yes {color: green}p#green:yes {color: green} If possible, tell the person who made the XHTML document to make theese IDs a single class AND remove the ":" from the ID and class names just in case.
  2. Isn't it most convient to store the sctipt(s) in external file(s) and reference them with the "src" attribute inside the pages themselves(not the frameset that is)?
  3. The best thing to do is to start the .aspx file which will reference the XML and the XSLT(s). It will execute the transformation then. In other words: instead of seeing the source XML and/or XSLT, the end-user will see the XHTML. This is really useful, scince Opera 8 and below, doesn't support XML.An ASP file that should execute the transformation can be found here. As said in the above post, you may execute several XSLTs in one ASP file. Then just create the ASP script itself. When the .aspx file is executed, it will transform the first XSLT, make the ASP script and continue with transforming the second XSLT and so on.Example: <%'Load XMLset xml = Server.CreateObject("Microsoft.XMLDOM")xml.async = falsexml.load(Server.MapPath("cdcatalog.xml"))'Load XSLset xsl = Server.CreateObject("Microsoft.XMLDOM")xsl.async = falsexsl.load(Server.MapPath("cdcatalogHEADER.xsl"))'Transform fileResponse.Write(xml.transformNode(xsl))%>If you want, you can place pure XHTML content here...<%'The ASP.NET content goes here%>...or here.<%'Load XMLset xml = Server.CreateObject("Microsoft.XMLDOM")xml.async = falsexml.load(Server.MapPath("cdcatalog.xml"))'Load XSLset xsl = Server.CreateObject("Microsoft.XMLDOM")xsl.async = falsexsl.load(Server.MapPath("cdcatalogFOOTER.xsl"))'Transform fileResponse.Write(xml.transformNode(xsl))%>
  4. Instead of using ASP.NET inside XSLT you can do the opposite: use XSLT inside ASP.NET. How? By executing two or more XSLTs with ASP.NET and put the actual ASP.NET script(s) between.
  5. Personally I would like it, but I think the forum will be flooded with advertisments then. A much better thig would be for everyone to place a link for their site in their signature(as they are actually doing currently) instead of making a new topic for each released site. Another thing might be a separated topic about this in the General forum, but something tells me it won't have a success.
  6. Camtasia Studio is truly THE best tool out there and THE easiest. I think there's a trial version of it, so you can just record everything before it expires.Macromedia has an application which uses Flash in order to record and possibly interact with the user. The program is known as Captivate. By "interaction" we mean to make the end-user click on a certain area of the video so something could happen. It's a good thing, but it's not neccesarry you know .By the way, yaniv, would you mind showing us your company's site and possibly the application itself .
  7. Using relative values is usually a good thing but if you are sure you want to disable your page from resizing I would suggest using absolute values, or to be more exact: Pixels.Like this: <span style="font-zise: 14px">The text with 14px size</span>
  8. A WUSIWYG editor can never be close to relative positioning. Everything always varies afterall. I happen to have made a page that looks almost perfectly in Dreamwaver though. The reason is that it's a strict page. Therefore if it doesn't look good in dreamwaver it doesn't look good anywhere. The way I fixed it was described in http://www.quirksmode.com. Just add "overflow: hidden" and "height: 100%" to all floated DIVs.
  9. Hello igourav_me,Please stop saying "Hello *username*, thanks for your reply". It's really annoying. Seriously... we aren't business men or some big corporation here after all. I know you are trying to be polite but still...Anyway. In order to process a form you would need SOME kind of language. What you use is totally up to you. You may use client side scripting (JavaScript, VBScript, etc.) or server side scripting (PHP, ASP(.NET), JSP, ColdFusion, etc.). There isn't a best language. It's all coming from the environment.If your host doesn't support server side scripting you'll have to use JavaScript or VBScript. The better choise from theese two is definetly JavaScript though scince it's more popular meaning that if you want to do something it's more likely that someone will help you.If your host does support a server sode scripting you'll have to see which one and learn the appropriate language. If it has a support for more than one server side I would recommend using the one that is not PHP unless you aren't sure if you're going to stay with that host.In anyways HTML and/or CSS alone are too simple for what you are asking. Instead of posting a new topic every time you want to do something "dynamical" I suggest you learn some of those languages yourself.
  10. boen_robot

    Programming

    Excuse me for the stupid question, but with what exactly you need help with?
  11. Everything you said is true besides the stylesheet thing. Every modern phone which has support for XHTML also has support for CSS(1...I'm not sure about 2 though). Infact if you look at the CSS tutorial on w3schools you'll see it's possible to make another stylesheet especially for mobile phones OR keep everything in a single stylesheet and separate the PC presentation and the Cell phone presentation like this: @media screen---CSS for PCs goes here---@media handheld---CSS for Mobile phones goes here--- Using relative values is also something to consider. The page will automatically be resized for the requred device if relative values are used.
  12. As far as I know XML and XSLT files must be fully loaded before any actions are executed.If you execute them on the client, this means less load to the server but more time for the client scince he/she has to download the whole files first.If you execute the transformations on the server, this should mean that there won't be any time needed for downloading scince the files are there. However, this would mean more load to the server. Using many ASP.NET files should result in approximately the same performance as with XSLT on the server I think.Conclusion=> If your server can handle a huge load, using XSLT on server shouldn't mean less performace but it DOES mean better organization.Please note: I am not aware of how server side performs with XSLTs and I'm not fully aware of XSLT's performance as well. My opinions are only considerations of my own simple logical thinking(excluding the fact that XML files must be fully loaded before they are processed).
  13. Make it a conditional statement. Something like: <xsl:for-each select="Contact"><xsl:if test="id"><tr><td><xsl:value-of select="id"/></td><td><xsl:value-of select="Name"/></td></tr></xsl:if></xsl:for-each> This should make the tr and td only if an ID element exist. Otherwise it will do nothing.
  14. Using relative sizes probably. In other words: percentage values(like 100%) I think.
  15. Your XML looks horrible ! I'm sorry, but I won't waste time understanding it. Instead I'll just give you an XPath expression that should do the trick . You (or someone else) decide where it's place should be: //E1EDL20/E1EDL24[POSNR ≡ 000010 or POSNR ≡ 000020] This is true if the POSNR is 000010 or 000020. False if anything else.Note: True means selected and False means not selcted.
  16. boen_robot

    predicat

    First stop: This is an XSLT question and there is another forum for it.As for the question itself. As far as I know XSLT only selects something if it exist. You may apply conditional statements for the XSLT to do something if the attribute doesn't exist and tell it to do nothing if it does. In other words: reverse the effect.Example(an altered version of a test file I have used here): <?xml version="1.0" encoding="windows-1251"?><!-- DWXMLSource="test.xml" --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" encoding="windows-1251"/><xsl:template match="/site/images"> <xsl:for-each select="image"> <xsl:choose> <xsl:when test="@id"> <xsl:variable name="location" select="location" /> <xsl:variable name="description" select="description" /> <img src="{$location}" alt="{$description}" /><br /> </xsl:when> <xsl:otherwise> <xsl:text>This is a text that will be shown if the image doesn't have an ID. If you remove this XSLT text element, the XSLT won't do anything if the image doesn't have an ID. The same way you may make the XSLT do something only if the image doesn't have an ID.</xsl:text><br /> </xsl:otherwise> </xsl:choose> </xsl:for-each></xsl:template></xsl:stylesheet>
  17. Excuse me for the noobish question, but what's "Xor"?
  18. The reason for this is that google have cached yor page in a moment where you had such a message. In order to "fix" this I suggest you sumbit your site to google the straight way:http://www.google.com/addurl/?continue=/addurland/or remove yourself from their database(see the link on the bottom of the page above.
  19. Try setting the height to more than 100%. By the way, you would need to remove the "td" in "td.InfoTd" in order for the settings to take effect. You used divs in your page after all, right?
  20. Exactly what would you need the XML for? Storing data about the sites? Hm... this is definetly a bad idea. An XML is fully loaded in the parser before any transormations are executed. If you keep huge amounts of such data in XML, this would cause serious performance problems to your search engine. A database like SQL is much better solution for this. You could however use XML to build the interface though. And the engine itself can't be contsructed with XML and related stuff. You would need a server side scripting language(PHP, ASP(.NET), ColdFusion, etc.).
  21. In order to show this info, you would also need some XSLT to transform it. Because I didn't had much to do, here's a simple XSLT I made few minutes ago specially for you(in other words: I used your feed for tests) . <?xml version="1.0" encoding="windows-1251"?><!-- DWXMLSource="http://www.shareasale.com/dealdatabase2.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="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" encoding="iso-8859-1"doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/><xsl:template match="/rss/channel"><xsl:variable name="link" select="//link" /><div><a href="{link}"><xsl:value-of select="title" /></a><br /><xsl:value-of select="description" /><br /><xsl:for-each select="image"><xsl:variable name="url" select="url" /><xsl:variable name="title" select="title" /><xsl:variable name="width" select="width" /><xsl:variable name="height" select="height" /><a href="{link}"><img src="{url}" alt="{title}" width="{width}" height="{height}" /></a><br /></xsl:for-each></div><div><xsl:for-each select="item"><span><a href="{link}"><xsl:value-of select="title" /></a><br /><xsl:value-of select="description" /><br /></span></xsl:for-each></div></xsl:template></xsl:stylesheet> A recently discovered(well...) JavaScript that would load the feed and the XSLT is this one: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>TEST</title> <script type="text/javascript"> var sourceXML = 'http://www.shareasale.com/dealdatabase2.xml'; var sourceXSL = 'rss.xsl'; var container = 'xmlData' ; function getIEXML() { var writeObj = document.getElementById(container); // Load XML var xml = new ActiveXObject("Microsoft.XMLDOM"); xml.async = false; xml.load(sourceXML); // Load the XSL var xsl = new ActiveXObject("Microsoft.XMLDOM"); xsl.async = false; xsl.validateOnParse = false; xsl.load(sourceXSL); // Transform writeObj.innerHTML = xml.transformNode(xsl); } function startMozXML() { //Load the XML xmlhttpXSL = new XMLHttpRequest(); xmlhttpXSL.open("GET", sourceXSL, false); xmlhttpXSL.setRequestHeader("Content-Type", "text/css") xmlhttpXSL.send(null); loadedStyle = xmlhttpXSL.responseXML; //Load the XSL xmlhttpXML = new XMLHttpRequest(); xmlhttpXML.open("GET", sourceXML, false); xmlhttpXML.setRequestHeader("Content-Type", "text/xml") xmlhttpXML.send(null); var xmlDoc = xmlhttpXML.responseXML; //Transform var writeObj = document.getElementById(container); var xsltProcessor = new XSLTProcessor(); var xmls = new XMLSerializer(); xsltProcessor.importStylesheet(loadedStyle); var xmlDoc = xsltProcessor.transformToDocument(xmlhttpXML.responseXML); writeObj.innerHTML = xmls.serializeToString(xmlDoc); } function init() { if(window.ActiveXObject) { getIEXML(); } else if(window.XMLHttpRequest && window.XSLTProcessor) { startMozXML(); } else { document.getElementById(container). innerHTML = 'No Support In This Browser..' } } window.onload = init; </script></head><body><div id="xmlData">In order to see this, you must turn on your JavaScript.<br />If yo have turned on your JavaScript, refresh the page and wait.</div></body></html> However, now that you mentioned it, I tested the above code and... khm... the only way it will run is if the XML and the XSLT are in one folder. It can't work with absolute paths.Perhaps if you or anyone else could adjust the code for absolute paths, this code will get all feeds out there(or atleast this one ).
  22. boen_robot

    Best One

    To tell you the truth, at first I wanted to make ColdFusion's points equal to ASP.NET's but in the process of writing I decided to give 1 more point to ColdFusion when it came to extension.I know that ASP has many(if not all) of the abilities of C# but NOT using the language itself is what made my point. PHP can be extended using it's existing capabilities which are great. ASP.NET has greather capabilities, that's for sure. But as I said, I think creating custom tags and functions in ColdFusion using ColdFusion itself is most probably easier and it has the ability for C# extension.Hm...oh well... substracting 1 point from ColdFusion for that makes it equal to ASP.NET.The big issue is still the price though. If hosts must pay for it, this makes it more expensive to us you know.Note: Theese are all my opinions and I don't want to "force" them. I don't have any experience with ASP.NET and I barely know PHP and ColdFusion, so my opinions are not as trustworthy but they are neutral scince I'm not very experienced with any of those languages.[edit] Well, the thing we are tring to do here is point the newbies in the right direction, right? That's why I had to mention the thing above. [/edit]
  23. That thing was not helpful, but it was kind'a inspiring for which I was able to find a solution on my own. I saw that topic about templates and I realized I used 2 template with a match of "/". Scince they are both included, they are considered to be one and a same template. Therefore XSLT select and renders only the last one with a template match="/". To avoid this problem I had to adjust my XPath expressions to fit with different matches. The chages were in the fragment codes:image.xsl <?xml version="1.0" encoding="windows-1251"?><!-- DWXMLSource="test.xml" --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" encoding="windows-1251"/><xsl:template match="/site/images"> <xsl:for-each select="image"> <xsl:variable name="location" select="location" /> <xsl:variable name="description" select="description" /> <img src="{$location}" alt="{$description}" /><br /></xsl:for-each></xsl:template></xsl:stylesheet> links.xsl <?xml version="1.0" encoding="windows-1251"?><!-- DWXMLSource="test.xml" --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" encoding="windows-1251"/><xsl:template match="/site/links"><xsl:for-each select="menu/item"> <xsl:variable name="link" select="link" /> <xsl:variable name="logo" select="logo" /> <xsl:variable name="title" select="title" /> <a href="{$link}"><img src="{$logo}" alt="{$title}" /></a><br /></xsl:for-each></xsl:template></xsl:stylesheet> I'm posting this for 2 reasons.1. If I ever forget it.2. If anyone ever has the same issue.
  24. May I please ask the moderator who made the Poll to get rid of the MX after Dreamwaver? As said above, the latest version is 8. If there are people who use older versions, then just saying "Dreamwaver" might be the best thing to do.
  25. boen_robot

    Best One

    Cold Fusion is a great language indeed. I tasted a bit of it's power and it's truly delicious .However, the fact that hosts must pay for it makes it very unatractive to them. That's actually the reason for the top popularity of php. It runs on both Linux and Windows and it's free.ASP.NET is free but it needs Windows which is payed.ColdFusion runs on Windows and Linux. Hosts can get Linux for free but they must still pay for ColdFusion itselfPHP can run on the free linux and PHP itself is also free.Conclusion: Hosts look for "invest less, win more" plans, and PHP requres less investment, yet it holds great enough power for people to use the host's plan.As for which is the best development tool. Let's make a comparrison:If you are not sure about your host or you want to enable yourself to move to a host that would support your language, you would need a language that is most widely supported. In this caseColdFusion-1ASP.NET-2PHP-3In order to publish your stuff you would have to create it first, right? So The ease of use in my opinion is this:ColdFusion-3ASP.NET-2PHP-1(I don't know more about PHP then I do about ASP.NET and yet I place ASP.NET above PHP, can you believe it?)Looking until now makes the languages all equal. Each gets 4 points. So let's continue.All languages have great support of many technologies. However, there are some for which a lot of lines are requred to get the thing you want. The best way to compare languages in terms of support is by comparing the number of commands needed to perform one task. Of what I have seen I may say this:ColdFusion-2ASP.NET-2PHP-1ColdFusion shares 2 points with ASP.NET because each supports things that the other doesn't support as well as the other. ASP has support for Microsoft kind'a things, and ColdFusion has a support for Macromedia kind'a things. PHP only has support for common things, not related to both parties.What if the language doesn't have ANY support of what you're looking after? You would need a way to extend the language with your own scripts using other languages. For this criteria I would say:ColdFusion-3ASP.NET-2PHP-1ColdFusion Supports creating custom tags and functions as well as extend the language with C++, JAVA, etc.ASP could be extended with with C++ and others as well but something tells me creating tags and functions linke in ColdFusion is easier then C++ extending.PHP can't be extended. The only way to extend it would be to use it's existing functions in a great combinations to create a new application for this particular action. In other words: a lot of lines of code.One last thing. Documentation. It's not about if there is some. Of course there is. the question is how easily understoodable and easy to find is. I think this:ColdFusion-2ASP.NET-2PHP-3Because of it's popularity, PHP is documented in many books and the manual in the official site is really huge and complete, though I admit it's hard to find anything in it as a learning source.The tutorials at w3schools about ASP(.NET) are more than complete I think so this alone makes it well documented. I bet other solutions there are also pretty full.ColdFusion is documented in dreamwaver as well as it's own documentation. I think due to Macromedia's attempts to make their language popular they inlude some info everywhere they get the chance which makes the language kind'a well documented but there isn't any place I would call "the source of knowedge" which is the reason I don't give 3 points to ColdFusion.The results are not very complete here by the way. But the total is this:ColdFusion-11ASP.NET-10PHP-8But the price is a big issue you know.
×
×
  • Create New...