Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - inline XLST document just not working... >Thread Next - Re: inline XLST document just not working... Re: inline XLST document just not working...To: NULL Date: 2/1/2006 9:21:00 AM "Kram" <mark.macumber@g...> wrote in message news:1138752504.808664.18270@z...... >I have an pretty strait forward XML document that needs to have in > internal XSLT document. > > I dont know how to do it, someone please help, I have listed what I > currently have, but its giving me an error: > > '{http://www.w3c.org/1999/XSL/Transform}version' is missing. > > I will truncate the usless XML that you dont need to see: > > ANY help is greatly appreciated > > <?xml version="1.0"?> > <?xml-stylesheet type="text/xsl" href="#conditionReport" ?> > <AreasRoot> > <room name="Entrance Hall"> > <item name="Doors"> > <roomIndex>0</roomIndex> > <conditionBefore>P</conditionBefore> > <conditionAfter /> > <commentsBefore >Looks crappy</commentsBefore> > <commentsAfter >Was Ok in the end</commentsAfter> > </item> > <item name="Security Door"> > <roomIndex>0</roomIndex> > <conditionBefore /> > <conditionAfter /> > <commentsBefore /> > <commentsAfter /> > </item> > </room> > > <!-- MORE ROOM ELEMENTS ARE IN HERE BUT NOT SHOWN NOW --> > > <userDetails> > <tennant address="155 Market Stret, Bendigo" name="Marie and Bob > Sinclare" landlord="DCK" leaseDate="19/12/2005" /> > </userDetails> > > <xsl:stylesheet id="conditionReport" > mlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> > > <xsl:template match="/"> > <xsl:processing-instruction name="mso-application"> > <xsl:text>progid="Excel.Sheet"</xsl:text> > </xsl:processing-instruction> > > <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" > xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:x="urn:schemas-microsoft-com:office:excel" > xmlns:html="http://www.w3.org/TR/REC-html40"> > <Styles> > <Style ss:ID="rotate"> > <Alignment ss:Vertical="Bottom" ss:Rotate="90" /> > </Style> > </Styles> > > <Worksheet ss:Name="Condition Report"> > <Table> > <Column ss:AutoFitWidth="0" ss:Width="19.5"/> > <Column ss:AutoFitWidth="0" ss:Width="150.75"/> > <Column ss:AutoFitWidth="0" ss:Width="19.5" ss:Span="2"/> > <Column ss:Index="6" ss:AutoFitWidth="0" ss:Width="161.25"/> > <Column ss:AutoFitWidth="0" ss:Width="19.5" ss:Span="2"/> > <Column ss:Index="10" ss:AutoFitWidth="0" ss:Width="161.25"/> > <Column ss:Index="12" ss:AutoFitWidth="0" ss:Width="72"/> > <Row> > <Cell> > <Data ss:Type="String"></Data> > </Cell> > <Cell> > <Data ss:Type="String"></Data> > </Cell> > <Cell ss:MergeAcross="3"> > <Data ss:Type="String">START</Data> > </Cell> > <Cell ss:MergeAcross="3"> > <Data ss:Type="String">END</Data> > </Cell> > </Row> > <Row> > <Cell ss:StyleID="rotate"> > <Data ss:Type="String">Room</Data> > </Cell> > <Cell> > <Data ss:Type="String">Item</Data> > </Cell> > <Cell ss:StyleID="rotate"> > <Data ss:Type="String">Good</Data> > </Cell> > <Cell ss:StyleID="rotate"> > <Data ss:Type="String">Fair</Data> > </Cell> > <Cell ss:StyleID="rotate"> > <Data ss:Type="String">Poor</Data> > </Cell> > <Cell> > <Data ss:Type="String">Other Items & Comments</Data> > </Cell> > <Cell ss:StyleID="rotate"> > <Data ss:Type="String">Good</Data> > </Cell> > <Cell ss:StyleID="rotate"> > <Data ss:Type="String">Fair</Data> > </Cell> > <Cell ss:StyleID="rotate"> > <Data ss:Type="String">Poor</Data> > </Cell> > <Cell> > <Data ss:Type="String">Other Items & Comments</Data> > </Cell> > </Row> > <xsl:for-each select="AreasRoot/room"> > <xsl:for-each select="item"> > <Row> > <xsl:if test="position()=1"> > <xsl:variable name="name" select="count(../item) - 1"/> > <Cell ss:StyleID="rotate"> > <xsl:attribute name="ss:MergeDown"> > <xsl:value-of select="$name" /> > </xsl:attribute> > > <Data ss:Type="String"> > <xsl:value-of select="../@name" /> > </Data> > </Cell> > </xsl:if> > > <Cell> > <xsl:attribute name="ss:Index"> > <xsl:value-of select="2"/> > </xsl:attribute> > <Data ss:Type="String"> > <xsl:value-of select="@name"/> > </Data> > </Cell> > <Cell> > <xsl:attribute name="ss:Index"> > <xsl:value-of select="3"/> > </xsl:attribute> > <Data ss:Type="String"> > <xsl:if test="./conditionBefore = 'G' ">x</xsl:if> > </Data> > </Cell> > <Cell> > <xsl:attribute name="ss:Index"> > <xsl:value-of select="4"/> > </xsl:attribute> > <Data ss:Type="String"> > <xsl:if test="./conditionBefore = 'F' ">x</xsl:if> > </Data> > </Cell> > <Cell> > <xsl:attribute name="ss:Index"> > <xsl:value-of select="5"/> > </xsl:attribute> > <Data ss:Type="String"> > <xsl:if test="./conditionBefore = 'P' ">x</xsl:if> > </Data> > </Cell> > <Cell> > <xsl:attribute name="ss:Index"> > <xsl:value-of select="6"/> > </xsl:attribute> > <Data ss:Type="String"> > <xsl:value-of select="./commentsBefore"/> > </Data> > </Cell> > > <Cell> > <xsl:attribute name="ss:Index"> > <xsl:value-of select="7"/> > </xsl:attribute> > <Data ss:Type="String"> > <xsl:if test="./conditionAfter = 'G' ">x</xsl:if> > </Data> > </Cell> > <Cell> > <xsl:attribute name="ss:Index"> > <xsl:value-of select="8"/> > </xsl:attribute> > <Data ss:Type="String"> > <xsl:if test="./conditionAfter = 'F' ">x</xsl:if> > </Data> > </Cell> > <Cell> > <xsl:attribute name="ss:Index"> > <xsl:value-of select="9"/> > </xsl:attribute> > <Data ss:Type="String"> > <xsl:if test="./conditionAfter = 'P' ">x</xsl:if> > </Data> > </Cell> > <Cell> > <xsl:attribute name="ss:Index"> > <xsl:value-of select="10"/> > </xsl:attribute> > <Data ss:Type="String"> > <xsl:value-of select="./commentsAfter"/> > </Data> > </Cell> > </Row> > </xsl:for-each> > </xsl:for-each> > </Table> > </Worksheet> > > <Worksheet ss:Name="Cover Page"> > <Table> > <xsl:for-each select="AreasRoot/userDetails/tennant"> > <Row> > <Cell> > <Data ss:Type="String"> > <xsl:value-of select="@address"/> > </Data> > </Cell> > <Cell> > <Data ss:Type="String"> > <xsl:value-of select="@name"/> > </Data> > </Cell> > <Cell> > <Data ss:Type="String"> > <xsl:value-of select="@landlord"/> > </Data> > </Cell>s > <Cell> > <Data ss:Type="String"> > <xsl:value-of select="@leaseDate"/> > </Data> > </Cell> > </Row> > </xsl:for-each> > </Table> > </Worksheet> > </Workbook> > </xsl:template> > </xsl:stylesheet> > > </AreasRoot> > 1) Maybe a typo but you haven't declared the xmlns on the stylesheet correctly. 2) How are you trying to transform? IE doesn't support embedded stylesheets, not sure about other browsers. -- Joe Fawcett (MVP - XML) https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
