Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] and [!CDATA{ - Simple question

From: "Graves, Jim \(CONTR\)" <jim.graves@------->
To:
Date: 3/1/2006 4:42:00 AM
To give my simple answer, I think CDATA construct is a valid XML
construct, but not in this context, as I explain below. The CDATA
construct is not a 'tag' it's a literal string of special (protected)
text, protected inside the 'section' (the CDATA 'section'). This is more
of an XML thing, as correctly alluded to by MK -- not so much an XSLT
thing. The CDATA is used to "block escape" a literal text string -- if
replacing illegal chars, ("<" and "&") with entity references would
cause more problems.

In your example schema, showing the XML schema, the wildcard: "##any"
lets the processor put in any namespace, when the additional: "
processContents="lax" " is used. It may be necessary but still not
'sufficient' to be 100% correct, hence the problems. To explain this to
some other inquisitive person, I'd suggest that perhaps the use of a
CDATA section is not acceptable as a namespace, presumably because there
is no well-defined namespace for CDATA, in the schema, thus the
problems.

This may be from off-point, but I've used
The CDATA stuff inside XSLT as an 'in-line' to javscript, as shown
below. This works inside XSLT:

<script implements-prefix="PDQ">
<xsl:comment>
<![CDATA[
var message="SOME DATA STR"
function redo(){
window.location.reload()
}
]]>
</xsl:comment>
</script>

Best wishes,
Jim

-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx]
Sent: Tuesday, 28 February 2006 02:58
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] <xs:any> and [!CDATA{ - Simple question


Your question doesn't seem to relate to XSLT.

But I think the answer (assuming that the complextype detail is the type
of
the detail element) is that hte schema does not allow text content and
therefore does not allow a CDATA section, since a CDATA section is just
another way of writing text content.

Michael Kay
http://www.saxonica.com/


> -----Original Message-----
> From: Pedro Alves [mailto:pedro@xxxxxxxxxxxxxxxx]
> Sent: 27 February 2006 23:59
> To: XSL List
> Subject: [xsl] <xs:any> and [!CDATA{ - Simple question
>
>
>
> Hello. I have a problem regarding weblogics soap response.
>
> Soap specification has the following:
>
> ___________________________________________
> <complexType name="detail">
>   <sequence>
>     <any namespace="##any" minOccurs="0"
> maxOccurs="unbounded" processContents="lax"/>
>   </sequence>
>   <anyAttribute namespace="##any" processContents="lax"/>
> </complexType>
> ___________________________________________
>
>
>
> And the xml I get says something like the following in the middle:
>
>
> ___________________________________________
> <?xml version="1.0" encoding="UTF-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <soap:Fault>
>       <faultcode>
> Client
> </faultcode>
>       <faultstring>
> com.altitude.tp.common.TransactionErrorException
> </faultstring>
>       <detail><![CDATA[
> Application fault:
> ><error><trxNumber>200602160008360421</trxNumber><statusFields
> ><field>824</field></statusFields><errorType>FU</errorType><er
rorCode>0</errorCode></erro
> r>
> at com.altitude.tp.logic.AltamiraLogicEJB.parseReturnFields(...)
> (...)
> ]]></detail>
>     </soap:Fault>
>   </soap:Body>
> </soap:Envelope>
> ___________________________________________
>
>
> Since I'm not being able to connect axis to that weblogic,
> I'm trying to
> prove my boss that's not my fault :)
>
>
> Is that <![CDATA[]] inside the <detail> a valid tag?
>
>
>
> Thanks
>
>
> --
> Pedro Alves
> pedro.alves@xxxxxxxx


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent