Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. Uh.... what? Anyway, do tell if you have any problems with the above solution .
  2. Um... that's actually "server parsed HTML". It's ordinary HTML with some commands (much like PHP) that most often are actually Apache's SSIs.As said, what the cliend (and the validator) see is the output of the PHP, not the PHP itself. The output of a PHP can be HTML, XHTML, XML or anything else you like. It doesn't matter.
  3. As far as I'm aware of, in XPath 2.0, there are also keyword, that can be used in the same way XQuery's FLWOR could be. And there are also other constructions that may help building such a query.This article on XML.com shows the new stuff. Scince I don't have anywhere to experiment theese new syntax constructs, I don't think I could do much to help you (though I didn't tested the above XSLT either).
  4. This can surely be done with XSLT, by the usage of xsl:key.Scince I haven't played with it enough yet, I can't point you how exactly to do this though.
  5. I actually prefer Acronis True Image if it's for backups. It can back up a whole parition and/or HDD into a single file (*.tib extension) that you can later use to resotre the machine. Not only that, but this file is actually compressed and there are few levels of compression to choose from. So if you have 7GBs, you might be able to reduce them to 4GBs, allowing you to have your HDD on DVD.The program can also create bootable rescue media, so if your computer becomes unbootable one day, you may use that utility to initiate the restoration.Once upon a time, there was also Partition Expert 2003, which can copy or move whole HDDs, similarly to Symantec Ghost, allowing you to choose how big each one will be (unlike Ghost, which de/increases them proportionally), it could resize paritions, convert file systems from FAT32 to NTFS and vise versa, etc.I don't find it now on the site though. It might be renamed to Acronis Partition Manager or included in Disk Disk Director... or both... something.
  6. Actually, I was wrong about the character encodings. After looking into Wikipedia, I can say that in XML 1.0 any Unicode 2.0 character is acceptable. This includes the UTF-8, UTF-16 and other charsets. I bet your ISO encoding is also allowed.Where "across the net" have you seen Data Islands being useful? The fact they only work in IE is probably the first reason to hate them.And your questions:1. Let's get something straight. XML is a language for defining languages, usually used as a data storage. Data Islands is a method for processing XML documents. So when I said I meant another method for processing XML data, not another method to store data.XSLT is one such way, so your impression that they work together is absolutely correct. However, any other language, like PHP, ASP(.NET), Cold Fusion, JSP, C++, C#, JAVA, etc. can also manipulate XML documents in order to display and/or use their contents.2. What space? As you said, there's no such thing in the source. If that's just IE's representation of the XML document... no need to worry at all. It all depends how YOU will be using the data, not how the browser will attempt to read it on it's own.
  7. OK, this Data Island is officially the largest one I've seen . That's what I call pushing Data Islands to their limits .Well, as far as I'm aware of, there shouldn't be a file size limit, though this XML is pretty large.There are character limitations though. But not about their numbers, but the characters themselves. Only valid UTF-8 characters are allowed. XML 1.1 allows for all valid UTF-16 characters, meaning less restrictions on this.I advise you to find another method... be it XSLT or PHP... just not Data Islands to display this data. Data Islands are useless anyway.
  8. Too many items?!?! That's a first.Anyway, yeah, concat() is used to concatenate 2 strings, but you do want to get the result of two functions, right?I was wrong about the grouping truly. I forgot you needed that too. I think now is the time I know what exactly are you using? XSLT? If so and if (as it happens) your XSLT processor supports distinct-values(), then something like this may help: <xsl:for-each select="distinct-values(/expenseReport/items/item/dateIncurred)"><xsl:value-of select="."/> <xsl:value-of select="sum(../amount)"/></xsl:for-each> I don't have much experience with XSLT 2.0 yet, but I have a hunch this might work.If you're not using that, then... well.... the things get harder. I seriosly need to practice XPath 2.0 .
  9. O...k... so exactly does the source of the output page (the one giving the error) looks like?
  10. how about: concat(distinct-values(/expenseReport/items/item/dateIncurred),' ',sum(/expenseReport/items/item/amount))
  11. How about a predicate in the for-each? <xsl:for-each select="/thing[name='moo']"> <moo/> </xsl:for-each>
  12. What this DTD does is to inlude all of SVGs modules into one DTD. I'll give "what's the use of modularization" speech another time, but for the time being, try seeing the modules one by one. For example, open the file svg-script.mod located in the same folder.
  13. The XML files Infopath stores contain the filled form. If I understand correctly, you want to display that filled form, correct? If so, then you need to do the same thing you would do for every other XML file: Use XSLT or another language to transform the XML into XHTML.
  14. So where exactly is <script type="text/javascript" language="JavaScript">function Redirect(mail,status){if(mail=="") alert("mail is not in valid format") else location.href = 'as.aspx?Email=' + mail + '&status=' + status}</script> this located?In the same ASP.NET file that is using the C# class or whatever? If so, then the reason for the error in IE is that the ASP file is read literally. When you launch an ASP (or any other server scripting) file, the server does the things in the file and returns an output. When you just run the code from your computer as you have (the "'file:///C:..." is what gives that out) there are no transformations done. IE expects to find plain XML file (in which a start like "<%" is truly illegal), not an ASP page.Install IIS on your computer and run that file from it. I mean, there's no way this will work without some sort of compiler, be it a server like IIS or VS.
  15. I don't have an XSLT yet, but honestly said, I'm starting to like the DOM methods better for theese type of tasks.In the past few days I've tryed expanding my DOM knowledge a bit, and it seems PHP's DOM abilities to remove and replace nodes are just perfect for all that stuff.There's only one minor problem... and I bet you know it... yes... it's PHP5 only. PHP4 has it's own DOM functions which I haven't tryed, but I don't plan to either, as they are deprecated in PHP5 in favor of their new equivalents.
  16. It's because of cases like this I (and my father on that matter) like to reccomend MicroTik's RouterOS. It can turn ANY computer into a dedicated router and with the WinBox utility you can control the router remotely and with a nice and pleasent GUI, instead of an ugly command line based control. Such a GUI definetly speeds up configuration and troubleshooting.True, only the payed versions are good, but every cent is worth it.
  17. Your server doesn't only have to be "SSI capable" but must also be configured to allow this. In Apache's configuration file, find: <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all Satisfy all</Directory> and turn it into: <Directory /> Options FollowSymLinks +Includes AllowOverride None Order deny,allow Deny from all Satisfy all</Directory> and add theese two lines somewhere else (on the end of the configuration file for example: AddType text/html .shtmlAddOutputFilter INCLUDES .shtml If that doesn't work... well... look at the How to tutorial from Apache.
  18. Fortunatly for you, XPath 1.0 has the sum() function which can sum the values from a certain node set.XSLT 1.0 however doesn't provide a straight way to convert a result tree fragment into a node-set (even though there are extensions for this).If your processor supports the EXSLT node-set extension or the MSXML node-set equivalent, the easiest way is this: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl"><xsl:variable name="times"><!--whatever you do in order to generate this: <required-service name="salvar" time="300"/> <required-service name="imprimir" time="400"/> <required-service name="gerarRelatorio" time="200"/> <required-service name="carregar" time="500"/> <required-service name="validar" time="100"/> <required-service name="exportar" time="400"/> <required-service name="importar" time="600"/> <required-service name="converter" time="300"/>--></xsl:variable><xsl:template match="/"><performance-analysis> <functional-component name="Functional Componente P" totaltime-requiredservices="{sum(exsl:node-set($times)/required-service/@time)}"> <xsl:copy-of select="exsl:node-set($times)"/> </functional-component></performance-analysis></xsl:template></xsl:stylesheet>
  19. In addition to what real_illusions said, in order to "tweak for IE", use conditional comments rather then CSS hacks.this topic will also provide you with some resources that might help you get a quicker start.
  20. I don't see anything othe then "Internet Explorer cannot display the webpage" (not a 404)... have you turned off your computer again?
  21. MailEnable is probably the best option, but as you can see, it's not exactly free. There's a free version with limited capabilities and payed ones.If you're looking for totally freeware mail server, then the only one I know is Mercury Mail, but I have no idea how to work with it. It's interface is really not user friendly, at least not in comparrison to Mail Enable.
  22. I don't know how your input looks and I'm not sure I understand what you need, but I can already see some errors in your stylesheet that you need to fix.First, you don't need the: <xsl:template match="/"> <xsl:apply-templates/></xsl:template> Remove itAnd second, only absolute paths start with "/". So instead of using "/things" and "/othersThings", use "things" and "othersThings" instead (no slash at the beginning!).Last but not least, there should be spaces between variables, and instead of copy-of, you should use value-of, like this: <xsl:value-of select="$var1 + $var2" /> Fix those, show some input and desired output and try to reformulate what you need.
  23. Exactly what sort of input/output you need?I mean, in order to declare an entity, you need DTD. But in order to use it you need a document to apply that DTD on. And where do you get the value and the name for the entity from? Details, details...
  24. Yup. Strict rules! Strict forever! Only in Strict can one get the strict CSS behaviour, even though without the MIME type that's not much of deal, but that's another story... in all cases: use strict.By the way, aspnetguy, it doesn't really matter what port you choose to run your web server from, as long as that port is opened and the web server is the only application using that port. I mean, that's what Apache's "Listen" directive is for- selecting a port to use. Every self respecting server (not only web server) has the option to change the port it's on.
  25. Try this one: <?xml version="1.0" encoding="windows-1251"?><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="3" /><xsl:template match="/store"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Products</title> </head> <body> <table bgcolor="#DDEEF7" WIDTH="100%"> <xsl:apply-templates select="product[(position() mod $group-size) = 1]" /> </table> </body> </html> </xsl:template><xsl:template match="product"> <tr> <xsl:for-each select=". | following-sibling::product[position() < $group-size]"> <td> <!--....some code displaying product info here...--> </td> </xsl:for-each> </tr> </xsl:template></xsl:stylesheet> It's how you should have adjusted this stylesheet in the first place. I mean, you only have one single template, but you need two.
×
×
  • Create New...