Advertisement
Advertisement
| 03.10.2008 at 10:40PM PDT, ID: 23230890 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: |
Saxon XSLT <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://sf.net/saxon" xmlns:lookup="java:com.adobe.gep.unicodelookup.UnicodeCharLookup" xmlns:string="java:java.lang.String" exclude-result-prefixes="saxon lookup string"> <xsl:output encoding="UTF-8" method="xml" indent="yes"/> <xsl:param name="locale">en-us</xsl:param> <xsl:param name="classFileName" select="'../../bin/dita/ClassHeader.xml'"/> <xsl:variable name="classHeader_map" select="document($classFileName)//apiPackage/apiClassifier/@id"/> <xsl:variable name="lookup" select="lookup:getInstance()"/> <xsl:template match="/"> <dita> <xsl:apply-templates/> </dita> </xsl:template> <xsl:template match="node()[contains(@class,' topic/topic ')] [not(contains(@class,' mini-reference/mini-reference ') or contains(@class,' mini-task/mini-task '))]"> <xsl:variable name="id" select="@id"/> <topic> <xsl:attribute name="id"> <xsl:value-of select="@id"/> </xsl:attribute> <title> <xsl:variable name="titletext"> <xsl:value-of select="apiName"/> </xsl:variable> <ph otherprops="unmodified"> <xsl:value-of select="normalize-space($titletext)"/> </ph> <ph otherprops="parsed"> <xsl:value-of select="lower-case($titletext)"/> </ph> </title> <body> <p> <xsl:apply-templates select="apiName/text()"/> <xsl:apply-templates select="node()[contains(@class,' topic/body ')]"/> </p> </body> </topic> <xsl:apply-templates select="node()[contains(@class,' topic/topic ')] [not(contains(@class,' mini-reference/mini-reference ') or contains(@class,' mini-task/mini-task '))]"/> </xsl:template> <xsl:template match="text()"> <xsl:variable name="clean"> <xsl:call-template name="replace"> <xsl:with-param name="text"> <xsl:call-template name="lowercase"> <xsl:with-param name="text"> <xsl:text> </xsl:text> <xsl:value-of select="normalize-space(.)"/> </xsl:with-param> </xsl:call-template> <xsl:text> </xsl:text> </xsl:with-param> </xsl:call-template> </xsl:variable> <xsl:analyze-string select="$clean" regex=" "> <xsl:matching-substring/> <xsl:non-matching-substring> <ph> <xsl:value-of select="."/> </ph> </xsl:non-matching-substring> </xsl:analyze-string> </xsl:template> <xsl:template name="replace"> <xsl:param name="text">none</xsl:param> <xsl:call-template name="lookupChar"> <xsl:with-param name="text"> <xsl:value-of select="$text"/> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="lowercase"> <xsl:param name="text">none</xsl:param> <xsl:value-of select="lower-case($text)"/> </xsl:template> <xsl:template match="node()[not(self::text())]" priority="-1"> <xsl:apply-templates/> </xsl:template> <xsl:template name="lookupChar"> <xsl:param name="text"/> <xsl:param name="flag"/> <xsl:if test="string-length($text) > 0"> <xsl:variable name="char"> <xsl:value-of select="substring($text,1,1)"/> </xsl:variable> <xsl:variable name="lookupChar" select="lookup:getChar($lookup, $char, $locale)"/> <xsl:choose> <xsl:when test="$lookupChar = ''"> <xsl:text> </xsl:text> </xsl:when> <xsl:otherwise> <xsl:value-of select="$char"/> </xsl:otherwise> </xsl:choose> <xsl:call-template name="lookupChar"> <xsl:with-param name="text"> <xsl:value-of select="substring-after($text,$char)"/> </xsl:with-param> <xsl:with-param name="flag"> <xsl:value-of select="$lookupChar"/> </xsl:with-param> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet> |
| Answered By: | Gertone |
| Expert Since: | 05/10/2005 |
| Accepted Solutions: | 2997 |
| Computer Expertise: | Beginner |