Subject: [xsl] Manipulating CDATA contents [SEC=UNCLASSIFIED] From: Enrico.Raymund@xxxxxxxxxxx Date: Wed, 18 Jun 2008 12:28:59 +1000 |
Hi, I have an XSLT that converts XML to HTML: XML Input: ================== <DefinitionCDATA> <![CDATA[ <xsd:sequence> <xsd:element ref="tns:GivenName"/> <xsd:element ref="tns:LastName"/> <xs:element ref="tns:Address"/> <xsd:element ref="tns:Telephone"/> <xsd:element ref="tns:Email"/> </xsd:sequence>]]> </DefinitionCDATA> Current HTML Output: ================== <xsd:sequence> <xsd:element ref="tns:GivenName"/> <xsd:element ref="tnsLastName"/> <xs:element ref="tns:Address"/> <xsd:element ref="tns:Telephone"/> <xsd:element ref="tns:Email"/> </xsd:sequence/> which doesn't display nicely on a browser -- displayed without line breaks! Desired HTML Output (not exactly pretty-print but at least line break at the end of each xs: definition): ================== <xsd:sequence><br/> <xsd:element ref="tns:GivenName"/><br/> <xsd:element ref="tnsLastName"/><br/> <xs:element ref="tns:Address"/><br/> <xsd:element ref="tns:Telephone"/><br/> <xsd:element ref="tns:Email"/><br/> </xsd:sequence/><br/> The help I need is to be able to insert "<br/>" after each ">" in the CDATA content. I'll worry about the tabbing (pretty-printing) later. Thanks in advance, Enrico Raymundo XML Architect Technical Integration Department of Immigration and Citizenship (DIAC) The "G", 46-50 Hibberson Street Gungahlin, ACT, 2912 Phone: (02) 6223 9604 Fax: (02) 6223 9692 Important Notice: If you have received this email by mistake, please advise the sender and delete the message and attachments immediately. This email, including attachments, may contain confidential, sensitive, legally privileged and/or copyright information. Any review, retransmission, dissemination or other use of this information by persons or entities other than the intended recipient is prohibited. DIAC respects your privacy and has obligations under the Privacy Act 1988. The official departmental privacy policy can be viewed on the department's website at www.immi.gov.au See: http://www.immi.gov.au/functional/privacy.htm
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Stanford University HighWire , Todd McGee | Thread | Re: [xsl] Manipulating CDATA conten, Jeff Sese |
Re: [xsl] value-of select - then mu, Adam Nielsen | Date | Re: [xsl] Manipulating CDATA conten, Jeff Sese |
Month |