Jump to content

Recommended Posts

im getting following errors:

 

Warning: DOMDocument::load() [domdocument.load]: Opening and ending tag mismatch: property line 6 and xsl:for-each in /home/students/accounts/s4909321/cos80021/www/htdocs/Assignment3/apartment.xsl, line: 25 in/home/students/accounts/s4909321/cos80021/www/htdocs/Assignment3/transform1.php on line 9

Warning: DOMDocument::load() [domdocument.load]: Opening and ending tag mismatch: for-each line 5 and property in /home/students/accounts/s4909321/cos80021/www/htdocs/Assignment3/apartment.xsl, line: 26 in/home/students/accounts/s4909321/cos80021/www/htdocs/Assignment3/transform1.php on line 9

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: compilation error in /home/students/accounts/s4909321/cos80021/www/htdocs/Assignment3/transform1.php on line 14

Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: xsltParseStylesheetProcess : empty stylesheet in /home/students/accounts/s4909321/cos80021/www/htdocs/Assignment3/transform1.php on line 14

Warning: XSLTProcessor::transformToXml() [xsltprocessor.transformtoxml]: No stylesheet associated to this object in /home/students/accounts/s4909321/cos80021/www/htdocs/Assignment3/transform1.php on line 16

Fatal error: Call to a member function saveXML() on a non-object in /home/students/accounts/s4909321/cos80021/www/htdocs/Assignment3/transform1.php on line 18

 

 

the xslt file is as following:

 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:output method="xml" indent="yes"/>
   <xsl:template match="/">
<rentalProperties>
    <xsl:for-each select="//property[numberofBedrooms>=2]">
<property>
 
 
<xsl:attribute name="contact"><xsl:value-of select='@contact'/></xsl:attribute>    
<xsl:value-of select="type"/>
<xsl:value-of select="price"/>
    
 
<address>
<xsl:value-of select="concat(address/streetNo,' ',address/street,', ',address/suburb,', ',address/state,', Australia')"/>
</address>
 
<numberofBedrooms>
<xsl:value-of select="numberofBedrooms" />
</numberofBedrooms>
 
<numberofBathrooms>
<xsl:value-of select="numberofBathrooms" />
</numberofBathrooms>
 
<garage>
<xsl:value-of select="garage" />
   </garage>
 
<description>
<xsl:value-of select="description" />
</description>
 
</xsl:for-each>
</property>    
</rentalProperties>    
</xsl:template>
</xsl:stylesheet>

 

 

Can somebody help me out ?

 

transform1.php

rental.xml

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.