Click here to Skip to main content
15,916,463 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: how to validate Xml with schema Pin
Henry Minute15-Jan-09 0:27
Henry Minute15-Jan-09 0:27 
AnswerRe: how to validate Xml with schema Pin
Anshumas15-Jan-09 19:51
Anshumas15-Jan-09 19:51 
QuestionRemoving Span Tag ? [modified] Pin
AndyInUK12-Jan-09 4:50
AndyInUK12-Jan-09 4:50 
AnswerRe: Removing Span Tag ? Pin
Dalek Dave12-Jan-09 5:27
professionalDalek Dave12-Jan-09 5:27 
GeneralRe: Removing Span Tag ? [modified] Pin
AndyInUK12-Jan-09 5:34
AndyInUK12-Jan-09 5:34 
GeneralRe: Removing Span Tag ? Pin
Dalek Dave12-Jan-09 5:54
professionalDalek Dave12-Jan-09 5:54 
GeneralRe: Removing Span Tag ? Pin
AndyInUK12-Jan-09 7:04
AndyInUK12-Jan-09 7:04 
AnswerRe: Removing Span Tag ? Pin
George L. Jackson16-Jan-09 8:20
George L. Jackson16-Jan-09 8:20 
I am not really sure what you are try to do. However, I believe you want to parse mixed text and element nodes. I was able to do what you desired with the following short examples:

[XML input]
<?xml version="1.0" encoding="utf-8"?>
<contents>
  <content name="title">
    <span class="b1">Heart Attack</span> - Contact us
  </content>
</contents>

[XSLT]
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
  <xsl:output method="xml" indent="yes"/>

  <xsl:template match="/contents">
    <results>
      <xsl:apply-templates select="content[@name='title']"/>
    </results>
  </xsl:template>

  <xsl:template match="content">
    <result>
      <xsl:value-of select="."/>
    </result>
  </xsl:template>
</xsl:stylesheet>

[XML output]
<?xml version="1.0" encoding="utf-8"?>
<results>
  <result>
    Heart Attack - Contact us
  </result>
</results>


"We make a living by what we get, we make a life by what we give." --Winston Churchill

GeneralRe: Removing Span Tag ? Pin
AndyInUK19-Jan-09 4:06
AndyInUK19-Jan-09 4:06 
QuestionRe: Removing Span Tag ? Pin
George L. Jackson19-Jan-09 12:40
George L. Jackson19-Jan-09 12:40 
AnswerRe: Removing Span Tag ? [modified] Pin
AndyInUK19-Jan-09 22:19
AndyInUK19-Jan-09 22:19 
GeneralRe: Removing Span Tag ? Pin
George L. Jackson20-Jan-09 8:14
George L. Jackson20-Jan-09 8:14 
GeneralRe: Removing Span Tag ? Pin
AndyInUK20-Jan-09 23:13
AndyInUK20-Jan-09 23:13 
GeneralRe: Removing Span Tag ? Pin
George L. Jackson21-Jan-09 3:52
George L. Jackson21-Jan-09 3:52 
GeneralRe: Removing Span Tag ? Pin
AndyInUK22-Jan-09 23:26
AndyInUK22-Jan-09 23:26 
QuestionXML Serialization & Deserialization Pin
mike12354310-Jan-09 9:22
mike12354310-Jan-09 9:22 
AnswerRe: XML Serialization & Deserialization Pin
Henry Minute12-Jan-09 5:19
Henry Minute12-Jan-09 5:19 
GeneralRe: XML Serialization & Deserialization Pin
mike12354312-Jan-09 8:06
mike12354312-Jan-09 8:06 
GeneralRe: XML Serialization & Deserialization Pin
Henry Minute12-Jan-09 10:08
Henry Minute12-Jan-09 10:08 
Questionxml Pin
sevda209-Jan-09 21:43
sevda209-Jan-09 21:43 
AnswerRe: xml Pin
Brij9-Jan-09 23:05
mentorBrij9-Jan-09 23:05 
GeneralRe: xml Pin
sevda2010-Jan-09 23:43
sevda2010-Jan-09 23:43 
Answerproblem with validate of this schema Pin
Honeyboy_207-Jan-09 3:05
Honeyboy_207-Jan-09 3:05 
GeneralRe: problem with validate of this schema Pin
Henry Minute12-Jan-09 5:15
Henry Minute12-Jan-09 5:15 
QuestionHTML tags in XML schema Pin
jonhbt6-Jan-09 23:16
jonhbt6-Jan-09 23:16 

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.