Click here to Skip to main content
15,888,454 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: Specific values Pin
Fatbuddha 112-Jun-07 23:10
Fatbuddha 112-Jun-07 23:10 
AnswerRe: Specific values Pin
S Douglas16-Jun-07 22:24
professionalS Douglas16-Jun-07 22:24 
Questiongenerate xslt code dynamically Pin
sdee211-Jun-07 14:42
sdee211-Jun-07 14:42 
AnswerRe: generate xslt code dynamically Pin
led mike12-Jun-07 4:45
led mike12-Jun-07 4:45 
Questionlanguage codings Pin
HUMPPAAA!11-Jun-07 3:30
HUMPPAAA!11-Jun-07 3:30 
AnswerRe: language codings Pin
HUMPPAAA!11-Jun-07 4:16
HUMPPAAA!11-Jun-07 4:16 
Questionxsl highlight function breaking html tags Pin
werD8-Jun-07 8:33
werD8-Jun-07 8:33 
AnswerRe: xsl highlight function breaking html tags Pin
werD8-Jun-07 10:43
werD8-Jun-07 10:43 
this is what im thinking.

the higlighter template uses before term and after

so
$text = <a href="http://www.walkthroughs.com">Simple steps to walkthrough</a>
$what = walk

before1 = <a href="http://www.
term1 = walk
after1 =throughs.com">Simple steps to walkthrough</a>



im thinking that i can use a reverse function and have
before1rev = .www//:ptth"=ferh a<
after1rev = >a/<hguorhtklaw ot spets elpmiS>"moc.shguorht

i was thinking i could run some logic off of that to get an intended result but now im just dizzy :S

any thoughts?

CODE
<xsl:template name="nonhtmlreplace">
<xsl:param name="before" />
<xsl:param name="before-reversed"/>
<xsl:param name="after" />
<xsl:param name="after-reversed" />
<xsl:param name="what" />
<xsl:choose>
<xsl:when test="contains($before-reversed,'&lt;') and not(contains($before-reversed,'&gt;'))">
/\<xsl:value-of select="$before" disable-output-escaping="yes"/><xsl:value-of select="$what" disable-output-escaping="yes"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="string-length(substring-before($before-reversed,'&lt;')) &lt; string-length(substring-before($before-reversed,'&gt;'))">
<xsl:value-of select="$before" disable-output-escaping="yes"/>
<font style="background-color:#66FF66">
<xsl:value-of select="$what" disable-output-escaping="yes"/>
</font>
</xsl:when>
<xsl:otherwise>
-<xsl:value-of select="$before" disable-output-escaping="yes"/>
<xsl:value-of select="$what" disable-output-escaping="yes"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>

</xsl:template>

here's the reverse function im using

CODE
<xsl:template name="reverse">
<xsl:param name="theString"/>

<xsl:variable name="thisLength" select="string-length($theString)"/>
<xsl:choose>
<xsl:when test="$thisLength = 1">
<xsl:value-of select="$theString"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="restReverse">
<xsl:call-template name="reverse">
<xsl:with-param name="theString"
select="substring($theString, 1, $thisLength -1)"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of
select="concat(substring($theString,
$thisLength,
1
)
,$restReverse
)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>


Questionxs:group with attribute Pin
Eugene Mirotin (Guard)7-Jun-07 11:41
Eugene Mirotin (Guard)7-Jun-07 11:41 
QuestionLogicaly selecting a section of XML Pin
Haun the 2nd7-Jun-07 11:11
Haun the 2nd7-Jun-07 11:11 
AnswerRe: Logicaly selecting a section of XML Pin
Haun the 2nd20-Jun-07 8:02
Haun the 2nd20-Jun-07 8:02 
QuestionXML Web service Pin
dews turner6-Jun-07 5:14
dews turner6-Jun-07 5:14 
AnswerRe: XML Web service Pin
Eugene Mirotin (Guard)8-Jun-07 4:41
Eugene Mirotin (Guard)8-Jun-07 4:41 
QuestionRe: XML Web service Pin
dews turner10-Jun-07 21:55
dews turner10-Jun-07 21:55 
Questionregarding xsl Pin
DGtech4-Jun-07 23:14
DGtech4-Jun-07 23:14 
AnswerRe: regarding xsl Pin
blackjack21505-Jun-07 0:56
blackjack21505-Jun-07 0:56 
QuestionHow to validate dynamic controls Pin
praveenkumar_mca4-Jun-07 21:19
praveenkumar_mca4-Jun-07 21:19 
AnswerRe: How to validate dynamic controls Pin
George L. Jackson5-Jun-07 11:40
George L. Jackson5-Jun-07 11:40 
QuestionXMLClassGenerator.exe Pin
Carmelo T.4-Jun-07 19:27
Carmelo T.4-Jun-07 19:27 
AnswerRe: XMLClassGenerator.exe Pin
George L. Jackson5-Jun-07 11:42
George L. Jackson5-Jun-07 11:42 
GeneralRe: XMLClassGenerator.exe Pin
Carmelo T.6-Jun-07 3:35
Carmelo T.6-Jun-07 3:35 
Questionhow do you set the data of an XML node? Pin
nathan74-Jun-07 17:51
nathan74-Jun-07 17:51 
QuestionCell Border not displaying for null or empty vlaues Pin
engsrini4-Jun-07 11:17
engsrini4-Jun-07 11:17 
AnswerRe: Cell Border not displaying for null or empty vlaues Pin
Arun.Immanuel4-Jun-07 15:33
Arun.Immanuel4-Jun-07 15:33 
QuestionShortcoming with XmlReader (2.0) Pin
PIEBALDconsult31-May-07 15:14
mvePIEBALDconsult31-May-07 15:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.