Fwd: xslt Transformation Complex Type

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: xslt Transformation Complex Type

Leonardo Ayres-2

Dears,


is this xsltTransformation above correct? it is about the ontology attached. I dont know what is wrong.
Anybody can help me?

Thanks


 <grounding:xsltTransformationString>

            <xsl:stylesheet version="1.0" xmlns:xsl="<a href="http://www.w3.org/1999/XSL/Transform" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.w3.org/1999/XSL/Transform "
                            xmlns:concepts="<a href="http://psm.s43.eatj.com/psm/owls/concepts.owl#" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://psm.s43.eatj.com/psm/owls/concepts.owl#">
              <xsl:template match="//concepts:Requirement">
                                <Requirement>
                                    <requirementName>
                                        <xsl:value-of select="concepts:requirementName"/>
                                    </requirementName>

                                    <preferences>
                                        <xsl:value-of select="concepts:Preferences"/>
                                    </preferences>
                                </Requirement>
              </xsl:template>
          <xsl:template match="//concepts:Preferences">
            <Preferences>
                <property>
                    <xsl:value-of select="concepts:PropertyPreference"/>
                </property>
            </Preferences>
   
           </xsl:template>
          <xsl:template match="//concepts:PropertyPreference">
            <PropertyPreference>
                    <propertyName>
                        <xsl:value-of select="concepts:propertyName"/>       
                    </propertyName>
                    <propertyType>
                        <xsl:value-of select="concepts:PropertyType"/>
                    </propertyType>
            </PropertyPreference>               
           </xsl:template>
          <xsl:template match="//concepts:PropertyType">
            <PropertyType>
                        <xsl:value-of select="concepts:PropertyType"/>
            </PropertyType>
           </xsl:template>
            </xsl:stylesheet>
       
</grounding:xsltTransformationString>


concepts.owl (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: xslt Transformation Complex Type

Blais, Curt USA

Leonardo,

 

I’ve been working on a similar problem, so your situation interests me.  Don’t have answers for you yet, but would like to understand what you are trying to do.

 

First, I had to remove the space in the namespace string you identify in the xmlns:xsl attribute before the XSLT processor I’m using (Altova XML-Spy) would recognize the xsl statements.  (there’s a space in your string at the start of your namespace for the concepts prefix as well)

 

Now, are you trying to transform the OWL document you had attached into an XML output document?  You might want to add an xsl:output statement to make that explicit. 

 

I don’t see how the XPath expressions like “//concepts:Requirement” are going to find a match in the OWL file – there is no element named concepts:Requirement in that file.

 

I would like to help if you can give me a little more information (or, I’ll be interested in the answer if you or someone else works it out).

 

Curt

 

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Leonardo Ayres
Sent: Sunday, May 07, 2006 6:57 AM
To: [hidden email]; Martin Kjeldsen; [hidden email]
Subject: [protege-owl] Fwd: xslt Transformation Complex Type

 

 

Dears,


is this xsltTransformation above correct? it is about the ontology attached. I dont know what is wrong.
Anybody can help me?

Thanks


 <grounding:xsltTransformationString>

            <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform "
                            xmlns:concepts=" http://psm.s43.eatj.com/psm/owls/concepts.owl#">
              <xsl:template match="//concepts:Requirement">
                                <Requirement>
                                    <requirementName>
                                        <xsl:value-of select="concepts:requirementName"/>
                                    </requirementName>

                                    <preferences>
                                        <xsl:value-of select="concepts:Preferences"/>
                                    </preferences>
                                </Requirement>
              </xsl:template>
          <xsl:template match="//concepts:Preferences">
            <Preferences>
                <property>
                    <xsl:value-of select="concepts:PropertyPreference"/>
                </property>
            </Preferences>
   
           </xsl:template>
          <xsl:template match="//concepts:PropertyPreference">
            <PropertyPreference>
                    <propertyName>
                        <xsl:value-of select="concepts:propertyName"/>       
                    </propertyName>
                    <propertyType>
                        <xsl:value-of select="concepts:PropertyType"/>
                    </propertyType>
            </PropertyPreference>               
           </xsl:template>
          <xsl:template match="//concepts:PropertyType">
            <PropertyType>
                        <xsl:value-of select="concepts:PropertyType"/>
            </PropertyType>
           </xsl:template>
            </xsl:stylesheet>
       
</grounding:xsltTransformationString>