Jump to content

SteveMurphy

Members
  • Posts

    22
  • Joined

  • Last visited

Everything posted by SteveMurphy

  1. Thanks justsomeguy and jhaslip.I tried the technique of adding the style to the <head> element and it worked fine. However, (I know this sounds strange) I don't own the html file as a whole, I'm just inserting tables. This is part of the javadoc process where you add comments/html to Java source files and the Javadoc processor spits out any html you've added into an html file that it creates. There are hundreds of html files produced by the Javadoc process and (although it could be done) it would be difficult to add the style to the <head> element. The Javadoc output references css stylesheets, so I can add the style to those and make this work. Ideally, for the sake of simplicity, I'd like to control the left margin in the list itself.That said, do the <ul> or <li> elements have any attribute that would allow me to contol the left margin?jhaslip -- how do I go about removing padding from the lists?Thanks again for your posts!
  2. Hi.I have a table that contains a list in one of its cells. However, I need to indent the entire list so that it lines up with some text that preceeds the list, but I don't know how to indent the list. Following is the html for my table: <html> <body> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private java.lang.String</CODE></FONT></TD> <TD><CODE><B>schoolName</B></CODE> <BR/>nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;Name of educational institution the student attends. </BR> <ul> <li>Harvard</li> <li>Princeton</li> <li>Iowa State</li> </ul> </TD> </TR> <TR> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private java.lang.String</CODE></FONT></TD> <TD><CODE><B>studentId</B></CODE> <BR/>nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;The student's identification number.</TD> </TR> </TABLE> </body> </html> In this examle, I need to have the bullets of the list line up with the word "Name" in "Name of educational institution the student attends." I am constrainted to keeping the non-breaking spaces that preceed the "Name of educational..." sentence.Note that for my sample above, I had to remove the & from nbsp; otherwise your browswer converts the non-breaking spaces to white space an you can't see the & npbs;Can anyone help?Thanks.
  3. I have two strings and I need to determine if they contain the same characters. I cannot find an "equals" function, so I've come up with a convoluted way of determining string equality:Use the contains() function to see if string2 is in string1If string2 is indeed in string1, then see if the length of the two strings are equal. If they are, then the two strings are equal.I'm using an <xsl:if test=""> element. I get one of my strings from a node using the text() function. The other string is in a variable called methName.I need help with the test attribute.I'd like to combine contains(text(), $methName) and the string-length() function within a test attribute but I'm completely clueless how to do this.It's hard to believe that XSL does not have a function to see if two strings are equal. Did I miss something?
  4. aalbetski,Thanks for the sample and taking the time to pass it on. I'm constrained to stay away from any script in my transformation -- I have to use the xalan processor.However, I did come up with a solution to my problem.Steve
  5. I have a stylesheet I'm using to output a text file from an XML file.In addition to processing my XML file, I'm using the document() function to open another xml file and set the context as follows: <xsl:apply-templates select="document($descrFileName)/Object/ObjectMethods/Method[1]"/> However, in addition to opening the file, the method seems also to be outputting the value of the Method[1] node and also the value of all its child nodes. Is the the expected behavior?This is not my intended functionality -- I want to set the context to the Method[1] node, then process a template that matches it. How do I accomplish this?Another question. If I want to open the file and set the context to a Method element with a certain value, how would I use the document() method? I tried the following, but it does not seem to work: <xsl:apply-templates select="document($descrFileName)/Object/ObjectMethods/Method['steve']"/> Obviously there's something I'm missing. Any help you can provide is much appreciated!Thanks.
  6. Hi boen_robot,Thanks for the information.No, I'm not Bulgarian, but your member information indicates you are. I googled "thank you in Bulgarian" and that's how I found the word.What is the translation of the quote you included? --(щото вече съм виждал няколко тука и от двата вида и всички така не казват, докато не ме видят и кажат едно "благодаря" ).
  7. Blagodarya boen_robot. I made your changes including eliminating the variable. I appreciate your help very much.I need to be able to learn from this. Is the rule that if you have something that is not part of X-Path syntax, you need to enclose the "thing" in quotes?
  8. I have a style sheet in which I'm trying to ouput a couple of entities and the value of a variable. Following is my code: <xsl:variable name="descrLine" select="."/> <xsl:value-of select="concat( ,°,$descrLine)"/> In my sample above, the two entities are a non-breaking space and the degree symbol. This forum is converting them so you can't see them above. I'm using & #16o; and & #176; without the spaces.However, when I run my stylesheet, I get the following error: SystemId Unknown; Line #69; Column #66; XSLT Error (javax.xml.transform.TransformerConfigurationException): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: A location path was expected, but the following token was encountered: The error message never says what the unexpected token is.Can anyone tell me what I'm doing wrong in my code? And descrLine does indeed have a value.Thanks,Steve
  9. I'm designing an XML file and one of the elements will have a true/false attribute. In terms of style, which of the following would be the best way to implement the attribute? IsBullet="true"/IsBullet="false" IsBullet="yes"/IsBullet="no" IsBullet="1"/IsBullet="0" Each item in the preceding list represents one possible way to implement my attribute. Each item shows my suggested way to represent the two possible values for the attribute.Thanks.
  10. I want my XSLT to output results to a text file, so I'm using the text output method within my stylesheet. To invoke my transformation, I'm using the technique provided in the w3schools XSLT tutorial under the "XSLT - On the Client" Link. The tutorial provides the following invocation: <html><body><script type="text/javascript">// Load XML var xml = new ActiveXObject("Microsoft.XMLDOM")xml.async = falsexml.load("cdcatalog.xml")// Load XSLvar xsl = new ActiveXObject("Microsoft.XMLDOM")xsl.async = falsexsl.load("cdcatalog.xsl")// Transformdocument.write(xml.transformNode(xsl))</script></body></html> Is there a way to use this technique to direct the results to a file instead of to the browser?Thanks!
×
×
  • Create New...