Click here to Skip to main content
15,921,156 members
Home / Discussions / XML / XSL
   

XML / XSL

 
Questionxml codes [modified] Pin
veasna_f2o4-Apr-07 6:17
veasna_f2o4-Apr-07 6:17 
AnswerRe: xml codes Pin
PIEBALDconsult4-Apr-07 7:10
mvePIEBALDconsult4-Apr-07 7:10 
QuestionAppendChild problem Pin
Rob Grainger4-Apr-07 4:23
Rob Grainger4-Apr-07 4:23 
QuestionReading an Xml file Pin
honeyss3-Apr-07 18:08
honeyss3-Apr-07 18:08 
AnswerRe: Reading an Xml file Pin
Stefan Troschuetz3-Apr-07 21:22
Stefan Troschuetz3-Apr-07 21:22 
AnswerRe: Reading an Xml file Pin
led mike4-Apr-07 4:39
led mike4-Apr-07 4:39 
QuestionLooking for a way to output CSV Pin
PIEBALDconsult2-Apr-07 13:01
mvePIEBALDconsult2-Apr-07 13:01 
AnswerRe: Looking for a way to output CSV [modified] Pin
PIEBALDconsult3-Apr-07 9:44
mvePIEBALDconsult3-Apr-07 9:44 
Alright, I got it working by using a param with my template and calling it recursively as required.

<xsl:template match="*">
  <xsl:param name="Cont" select="."/>
  <xsl:if test="@Null='false'">
    <xsl:text>"</xsl:text><xsl:value-of select="substring-before(concat($Cont,'&quot;'),'&quot;')"/><xsl:text>"</xsl:text>
    <xsl:if test="contains($Cont,'&quot;')">
      <xsl:apply-templates select=".">
        <xsl:with-param name="Cont" select="substring-after($Cont,'&quot;')"/>
      </xsl:apply-templates>
    </xsl:if>
  </xsl:if>
</xsl:template>


Note the use of concat() in the call to substring-before().

Here the param is named "Cont" and you can think of it as meaning either "contents" or "continuance".

Given an initial value of: aaa "bbb" ccc
1) Output "aaa "
2) Recurse with bbb" ccc
3) Output "bbb"
4) Recurse with ccc
5) Output " ccc"
Result: "aaa ""bbb"" ccc"

I would appreciate any thoughts on this technique.
QuestionStructured HTML to XML Pin
RichardInToronto30-Mar-07 5:49
RichardInToronto30-Mar-07 5:49 
AnswerRe: Structured HTML to XML Pin
PIEBALDconsult2-Apr-07 14:56
mvePIEBALDconsult2-Apr-07 14:56 
GeneralRe: Structured HTML to XML Pin
RichardInToronto2-Apr-07 15:50
RichardInToronto2-Apr-07 15:50 
GeneralRe: Structured HTML to XML Pin
PIEBALDconsult3-Apr-07 3:27
mvePIEBALDconsult3-Apr-07 3:27 
QuestionI'm confused Pin
Mike Hankey29-Mar-07 15:53
mveMike Hankey29-Mar-07 15:53 
AnswerRe: I'm confused Pin
Christian Graus29-Mar-07 16:00
protectorChristian Graus29-Mar-07 16:00 
GeneralRe: I'm confused Pin
Mike Hankey29-Mar-07 16:12
mveMike Hankey29-Mar-07 16:12 
QuestionXml - Element or CDATA Pin
Mike Hankey28-Mar-07 16:59
mveMike Hankey28-Mar-07 16:59 
AnswerRe: Xml - Element or CDATA Pin
Stefan Troschuetz28-Mar-07 23:20
Stefan Troschuetz28-Mar-07 23:20 
GeneralRe: Xml - Element or CDATA Pin
Mike Hankey29-Mar-07 1:12
mveMike Hankey29-Mar-07 1:12 
Questionxmlwriter [modified] Pin
Tkml23628-Mar-07 8:56
Tkml23628-Mar-07 8:56 
AnswerRe: xmlwriter Pin
led mike28-Mar-07 10:26
led mike28-Mar-07 10:26 
GeneralRe: xmlwriter Pin
Tkml23628-Mar-07 10:47
Tkml23628-Mar-07 10:47 
GeneralRe: xmlwriter Pin
Stefan Troschuetz28-Mar-07 23:13
Stefan Troschuetz28-Mar-07 23:13 
QuestionAbout Xml parser Pin
siddharthsan27-Mar-07 22:49
siddharthsan27-Mar-07 22:49 
AnswerRe: About Xml parser Pin
led mike28-Mar-07 10:24
led mike28-Mar-07 10:24 
QuestionWeb Service : Unable to read data from the transport connection Pin
Mayank Prajapati26-Mar-07 19:41
Mayank Prajapati26-Mar-07 19:41 

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.