Jump to content

Sparkie

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Sparkie

  1. I'm running an XSLT against a 3rd party XML file that has element names that contain colons, i.e. <prefix:name>. Anyway if I rename the element to <prefixname> everything works as expected, but I get nothing if I try <xsl:value-of select="prefix:name"/> - a big blank where that info should be.

    I know it's recommended that you don't use element names with colons, but I can't do anything about this and I can't go through all their files to rename these elements. BUT, 1. it's only a recommendation, so shouldn't I get something? and 2. is there some way around this?

    thanks for any help

  2. In our doco we display lots of shell commands for users to cut and paste into a terminal, but we also need to display the command as it would appear in a terminal, ie with the actual shell prompt.

     

    how can I still display the command realistically in the doco, but limit the copy/paste operation to just pick up the command and not the prompts - this is an issue especially on multi-line commands.

     

    e.g.: display this in doco

    MyTerm >> do something

    MyTerm >> do something else

    but let the user copy/paste just the stuff after "MyTerm >>"

  3. Hi,

    apologies for the ignorance, but I am pretty new to this. So 1. what does the above mean, and 2. how?

     

    PS. I can currently do the test:

    <xsl:template match="foobar">
    <xsl:choose>
    <xsl:when attribute="@attr='true'">
    <xsl:call-template name="this_version" />
    </xsl:when>
    <xsl:otherwise>
    <xsl:call-template name="other_version" />
    </xsl:otherwise>
    </xsl:choose>

    </xsl:template>

    My problem is instead of having the call here, I need it where I can format it to display properly. My problem now is how to call when I am formatting and/or what to do here instead of call. Can I save it to a new template which I can call later when I need it? i.e.

    <h2>Mt program spec</h2> <dl>

    <dt><xsl:call-template name="other_version"/></dt>

    <dd><xsl:call-template name="rest_of_spec"/></dd>

    </dl>

  4. For historical reasons we have program specs using one lot of XML tags that need to be transformed into a different set of tags for inclusion in our documentation. I could hand code each, but some are very large and they will change over time (updates, etc).

    I need to create an XSLT file that tests elements and their attributes to determine how to display them in the documentation. How can I test and then output the test result to a new template which I can then call ? I need these to be separate as each program spec will be formatted slightly differently. Is this possible or is there a better way of doing it?

     

     

×
×
  • Create New...