Jump to content

DVezina

Members
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

1 Neutral

About DVezina

  • Rank
    Newbie

Profile Information

  • Gender
    Male
  • Location
    Orlando Florida
  1. OK one more try ...DITA eh?All the element ids are stored in a key called "key_anchor". This is defined in links.xsl.Make sure your step actually has an id attribute in the MERGED XML. This sounds silly but if this is running through the DITA toolkit, strange things can happen.You want to put the <fo:inline> in your step template. task-elements.xsl<xsl:template match="*[contains(@class, ' task/steps ')]/*[contains(@class, ' task/step ')]"><fo:inline id="{@id}"/>Then in your xref template, you should find the matching id in the key_anchor.Now you are truly pointing at the step
  2. Well that posted incorrectly.Here it is again. --DITA eh? All the element ids are stored in a key called "key_anchor". This is defined in links.xsl. Make sure your step actually has an id attribute in the MERGED XML. This sounds silly but if this is running through the DITA toolkit, strange things can happen.You want to put the <fo:inline> in your step template. task-elements.xsl<xsl:template match="*[contains(@class, ' task/steps ')]/*[contains(@class, ' task/step ')]"><fo:inline id="{@id}"/>Then in your xref template, you should find the matching id in the key_anchor. Now y
  3. DITA eh? All the element ids are stored in a key called "key_anchor". This is defined in links.xsl. Make sure your step actually has an id attribute in the MERGED XML. This sounds silly but if this is running through the DITA toolkit, strange things can happen.You want to put the <fo:inline> in your step template. task-elements.xsl [size="1"]<xsl:template match="*[contains(@class, ' task/steps ')]/*[contains(@class, ' task/step ')]">[/size][size="1"]<fo:inline id="{@id}"/>[/size] Then in your xref template, you should find the matching id in the key_anchor. Now you are trul
  4. I'm posting this for zoomer003. "<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:param name="ResultsBy" /><xsl:param name="ViewByUrl" /><xsl:param name="ViewByValue" /><xsl:param name="IsNoKeyword" /><xsl:param name="IsFixedQuery" /><xsl:param name="ShowActionLinks" /><xsl:param name="MoreResultsText" /><xsl:param name="MoreResultsLink" /><xsl:param name="CollapsingStatusLink" /><xsl:param name="CollapseDuplicatesText" /><xsl:param name="AlertMeLink" /><xsl:param name="AlertMeTe
  5. <xsl:value-of select="count(./@*)"/>
  6. When you use <xsl:value-of select="title"/> you are only pulling in the text - not processing the nodes. Try: <xsl:apply-templates select="title"/>
  7. Here is one way without using multiple passes on the file. <xsl:template match="text()"><xsl:choose><xsl:when test="contains(.,'<CreditCardNumber>')"><!-- This is the CDATA that I want to mask and write back out as CDATA --> <xsl:variable name="tcontent"><xsl:value-of select="substring-after(substring-before(.,'</CreditCardNumber>'),'<CreditCardNumber>') "/> </xsl:variable> <xsl:text disable-output-escaping="yes"><![CDATA[<CreditCardNumber></xsl:text> <xsl:call-template name="maskVariable"> <xsl:w
  8. That didn't post correctly. Here it is again: <xsl:output method="xml" cdata-section-elements="GetAmountDueResult"/> <xsl:template match="GetAmountDueResult"><xsl:copy><xsl:value-of disable-output-escaping="yes" select="."/></xsl:copy></xsl:template >
  9. Try this: [/size][size="2"] <xsl:output method="xml" [font="Courier New"][size="2"][font="Courier New"][size="2"]cdata-section-elements="GetAmountDueResult"[/size][/font][/size][/font][size="2"]/>[/size][/size][size="2"] <xsl:template match="GetAmountDueResult"><xsl:copy><xsl:value-of disable-output-escaping="yes" select="."/></xsl:copy></xsl:template >[/size][size="2"]
  10. I would use a recursive template but I'd love to see how others might do this. <xsl:template match="avg"/><xsl:template name="findAverage"> <xsl:param name="numlessons"/> <xsl:param name="pointer"/> <xsl:param name="total"/> <xsl:choose> <xsl:when test="$pointer <= $numlessons"> <xsl:variable name="subtotal"> <xsl:value-of select="child::*[number($pointer)]"/> </xsl:variable> <xsl:variable name="total"> <xsl:value-of select="number($subtotal) + number($total)"/> </xsl:variable> <xsl:cal
  11. If your input looks like this: <database><Record><Field ID="8131"><Value>1. Primary</Value></Field><Field ID="8132"><Value>Robert Crane</Value></Field></Record><Record><Field ID="8131"><Value>2. Secondary</Value></Field><Field ID="8132"><Value>David Willis</Value></Field></Record><Record><Field ID="8131"><Value>2. Secondary</Value></Field><Field ID="8132"><Value>Mary Jones</Value></Field></Record><Record>
  12. The file can be converted to nested xml easier with non-xml based tools like perl and flex (in my opinion). However, if you must use XSLT here is what I use to convert a database file to html. Input File <database><H1>Title 1</H1><para>Para 1</para><para>Para 2</para><para>Para 3</para><H2>Title 2</H2><para>Para 1</para><para>Para 2</para><H2>Title 2</H2><para>Para 1</para><para>Para 2</para><H3>Title 3</H3><para>Para 1</para><para>Para 2&
  13. Consider passing both the string and the node-set to your mark-up template. (XSLT 2 only) If you need to use XSLT 1.0, you can use the exsl:node-set function. <xsl:template name="List" match="li"> <xsl:variable name="lnodes"> <li><xsl:copy-of select="node()"/></li></xsl:variable> <xsl:call-template name="markup"> <xsl:with-param name="text" select="."/> <xsl:with-param name="phrases" select="document('../../documents/main/keywords.xml')/keywords/keyword"/> <xsl:with-param name="first-only" select="false()"/> <xsl
  14. Have you tried <fo:block-container> with reference-orientation attribute?
  15. You could do it this way: <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" version="1.0" encoding="iso-8859-1" indent="yes"/> <xsl:template match="/"> <xsl:apply-templates select="//prime"/></xsl:template> <xsl:template match="prime"> <xsl:apply-templates select="note"/></xsl:template> <xsl:template match="note"> <xsl:choose> <xsl:when test="@style='tt'"> <xsl:apply-templates mode="tt"/> </xsl:when>
×
×
  • Create New...