Title: Xsl help

Hi,

 

   Please let me know about any API to create an XML file on Mac.

 

Regards

Puneet Bhatia

Quark Media House India

0172- 229- 9271

 

CONFIDENTIALITY NOTICE

This e-mail transmission and any documents, files, or previous e-mail messages appended or attached to it, may contain information that is confidential or legally privileged. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that you must not read this transmission and that any disclosure, copying, printing, distribution, or use of the information contained or attached to this transmission is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify the sender by telephone (+91.172.229.9271) or return e-mail message ([EMAIL PROTECTED]) and delete the original transmission, its attachments, and any copies without reading or saving in any manner. Thank you.

 


From: Arunkumar Halebid [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 11, 2005 3:40 PM
To: [email protected]
Subject: RE: Xsl help

 

Thanks. I could get the XML change and first step was simple as you stated afterwards.


From: Hughes, Michael (GF-X) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 11, 2005 2:33 PM
To: [email protected]
Subject: RE: Xsl help

I think the problem may be due to the input XML. The contents of the element MOC are not simple in that you have nested comments, elements and text so when you do your Model/MOC=’MOC1’ check it is likely to fail because the contents certainly don’t equal that! Even if you ignore the sub-elements, you’ve at least got a \n after the MOC1 and some indent whitespace before the actual comment <!--method 1-->.

 

Are you able to redefine the structure of the XML? It would be a hell of a lot easier if the structure were something like this…

 

<Model>
       
<!-- MOC1-->
       
<MOC name=’ MOC1>
               
<!--method 1-->
               
<Method name=’publish’>
                       
<attrName>Load</attrName>
               
</Method>
       
</MOC>
       
<!-- MOC2-->
</Model>

It’s a lot easier to write the XSLT if the XML content is simple (i.e. don’t mix up text and elements and comments etc).

 

HTH

 

-----Original Message-----
From: Arunkumar Halebid [mailto:[EMAIL PROTECTED]
Sent: 11 January 2005 08:26
To: [email protected]
Subject: Xsl help

 

Hello,

* In the xsl I set the output method to text. Within the style sheet I am trying to include some string also as output, apart from node values of the input xml.

* I do not see any text output in the resulting transformation. Where am I doing a mistake?

Xsl rule is something like:

<xsl:template match="/Model/MOC">
               
<xsl:choose>
                       
<xsl:when test="/Model/MOC='MOC1'">Class        <xsl:value-of select="/rncModel/mngMOC"/>
                               
<xsl:apply-templates select="attrName"/>
                       
</xsl:when>
               
</xsl:choose>                          
</xsl:template

Xml

<Model>
       
<!-- MOC1-->
       
<MOC>MOC1
               
<!--method 1-->
               
<Method>publish
                       
<attrName>Load</attrName>
               
</Method>
       
</MOC>
       
<!-- MOC2-->
</Model>

 

Reply via email to