<snip/>-----Urspr�ngliche Nachricht----- Von: Mike Castle [mailto:[EMAIL PROTECTED] Gesendet: Montag, 8. Dezember 2003 21:23 An: [EMAIL PROTECTED] Betreff: XSLT with entities and therefore DOCTYPE
There is the mulberrytech xsl-list that is a very good resource. I will try to answer inline. Also, get a copy of Mike Kay's XSLT Programmer's Reference 2cnd edition (the bible for xsl).
So, I've been trying to experiment with xsl:variable, but to no luck. For example, I really need to do something like the following:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:variable name="foo">[test]</xsl:variable> <xsl:variable name="bar" select="/project/target$foo"/>
This might be a typo..................................^
I am not clear on what you are trying to do, but here are some ideas.
Are you trying to hold a string in this variable? If so, you need to put the string in quotes:
<xsl:variable name="bar" select="concat('/project/target/', $foo)"/>
Are you trying to access something like:
<project> <target> [test] </target> </project>
then:
<xsl:variable name="bar" select="normalize-space(/project/target)"/>
Are you trying to build an XPath on the fly to access something like:
<project> <target> <test boo="something"/> </target> </project>
then:
<xsl:variable name="bar" select="/project/target/*[local-name()=$foo]/@something"/>
<xsl:value-of select="$bar"/> </xsl:template> </xsl:stylesheet>
And I've tried several variations on this technique to no avail.
So, is there anyway I can get ant to convince XSLT not to validate the stylesheet, even though it has a DOCTYPE (I really don't want to have to write a DTD for this thing)?
don't use a DTD for this.
Or would anyone know how to hammer xsl:variables into doing what I want?
don't know what you want.
Outside of that, where do I go to ask for help (specifically, what would YOU recommend)? My searches really haven't turned up too much useful information, but I'm new enough to this that I am probably missing useful terms that would help.
see above
best, -Rob
Thanks a lot, mrc -- Mike Castle [EMAIL PROTECTED] www.netcom.com/~dalgoda/ We are all of us living in the shadow of Manhattan. -- Watchmen fatal ("You are in a maze of twisty compiler features, all different"); -- gcc
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
