Friday, February 24, 2012
blank textarea
I can't get a blank textarea when applying my .xslt to a .xml file. I know
this is a common error because I've already found some solutions but none
worked :(
The parser always translates the solutions to: <textarea/>
Thanks in advance ;)
CheersFuria wrote:
> Hi,
> I can't get a blank textarea when applying my .xslt to a .xml file. I
> know this is a common error because I've already found some solutions
> but none worked :(
> The parser always translates the solutions to: <textarea/>
Have you tried inserting an
<textarea>
<xsl:text> </xsl:text>
</textarea>
///Peter
--
XML FAQ: http://xml.silmaril.ie/|||"Peter Flynn" wrote:
> Have you tried inserting an
><textarea>
><xsl:text> </xsl:text>
></textarea>
Hi,
gona try that but i've tried similar things such as:
<textarea>
<xsl:text> </xsl:text>
</textarea>
and
<textarea>
<xsl:text>&nbps;</xsl:text>
None worked.
Feedback soon, thanks Peter ;)
</textarea>|||Nop...:(
None works...it still has a blank space...grrr
Cheers
Furia
blank textarea
I can't get a blank textarea when applying my .xslt to a .xml file. I know
this is a common error because I've already found some solutions but none
worked
The parser always translates the solutions to: <textarea/>
Thanks in advance ;)
Cheers
Furia wrote:
> Hi,
> I can't get a blank textarea when applying my .xslt to a .xml file. I
> know this is a common error because I've already found some solutions
> but none worked
> The parser always translates the solutions to: <textarea/>
Have you tried inserting an
<textarea>
<xsl:text> </xsl:text>
</textarea>
///Peter
XML FAQ: http://xml.silmaril.ie/
|||"Peter Flynn" wrote:
> Have you tried inserting an
><textarea>
><xsl:text> </xsl:text>
></textarea>
Hi,
gona try that but i've tried similar things such as:
<textarea>
<xsl:text> </xsl:text>
</textarea>
and
<textarea>
<xsl:text>&nbps;</xsl:text>
None worked.
Feedback soon, thanks Peter ;)
</textarea>
|||Nop...
None works...it still has a blank space...grrr
Cheers
Furia
Friday, February 10, 2012
Bit of a beginner question on SQL-XML
e.g.
My query
SELECT Code, ClassName FROM CLASSMAPPING
FOR XML RAW
returns the results like this, it's a single line of text word-wrapped and truncated after 256 characters:
<row Code="AUS" ClassName="Australia"/><row Code="CAN" ClassName="Canada"/><row Code="GBR" ClassName="UK"/><row Code="IRL" ClassName="Ireland"/><row Code="NZL" ClassName="New Zealand"/><row Code="PAR" ClassName="Partner schools"/><row Code="USA" ClassName=
But I surely I should really see results laid out like this:
<row Code="AUS" ClassName="Australia"/>
<row Code="CAN" ClassName="Canada"/>
<row Code="GBR" ClassName="UK"/>
<row Code="IRL" ClassName="Ireland"/>
<row Code="NZL" ClassName="New Zealand"/>
<row Code="PAR" ClassName="Partner schools"/>
<row Code="USA" ClassName="USA"/>
I can't find any information about a switch or trigger to make this work but all the literature I've read indicates it should work. Has anyone seen this before? Can you help?
I have SQL server 2000 with W2K3 server.
I don't think FOR XML does any attempt to format the XML it generates for human reading so you have to live with lack of line breaks and indentation. If you look at the result in an XML editor then it should provide you an option to pretty print the XML.
|||I am not an expert but I am trying to learn like you; maybe something like this?
Code Snippet
declare @.xml xml
set @.xml = '<row Code="AUS" ClassName="Australia"/><row Code="CAN" ClassName="Canada"/><row Code="GBR" ClassName="UK"/><row Code="IRL" ClassName="Ireland"/><row Code="NZL" ClassName="New Zealand"/><row Code="PAR" ClassName="Partner schools"/>'
select x.t.query('.') as Results from @.xml.nodes('/row') x(t)
/*
Results
-
<row Code="AUS" ClassName="Australia" />
<row Code="CAN" ClassName="Canada" />
<row Code="GBR" ClassName="UK" />
<row Code="IRL" ClassName="Ireland" />
<row Code="NZL" ClassName="New Zealand" />
<row Code="PAR" ClassName="Partner schools" />
*/
|||I have not done much with SQL Server 2000 but with SQL Server 2005 the XML generated with FOR XML is all on one line. However SQL Server Management Studio or Management Studio Express has a built-in XML editor pane where it pretty prints and colorizes the XML for human viewing.|||OK, thanks for confirming this.
|||
I have, I think, the same problem; given N rows, return a recordset with N xml documents.
The 'FOR XML EXPLICIT' looks like the way to go, except that I can't break up the result into distinct rows.
|||Could be that this solution will help;
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1702105&SiteID=1
Bit of a beginner question on SQL-XML
e.g.
My query
SELECT Code, ClassName FROM CLASSMAPPING
FOR XML RAW
returns the results like this, it's a single line of text word-wrapped and truncated after 256 characters:
<row Code="AUS" ClassName="Australia"/><row Code="CAN" ClassName="Canada"/><row Code="GBR" ClassName="UK"/><row Code="IRL" ClassName="Ireland"/><row Code="NZL" ClassName="New Zealand"/><row Code="PAR" ClassName="Partner schools"/><row Code="USA" ClassName=
But I surely I should really see results laid out like this:
<row Code="AUS" ClassName="Australia"/>
<row Code="CAN" ClassName="Canada"/>
<row Code="GBR" ClassName="UK"/>
<row Code="IRL" ClassName="Ireland"/>
<row Code="NZL" ClassName="New Zealand"/>
<row Code="PAR" ClassName="Partner schools"/>
<row Code="USA" ClassName="USA"/>
I can't find any information about a switch or trigger to make this work but all the literature I've read indicates it should work. Has anyone seen this before? Can you help?
I have SQL server 2000 with W2K3 server.
I don't think FOR XML does any attempt to format the XML it generates for human reading so you have to live with lack of line breaks and indentation. If you look at the result in an XML editor then it should provide you an option to pretty print the XML.
|||I am not an expert but I am trying to learn like you; maybe something like this?
Code Snippet
declare @.xml xml
set @.xml = '<row Code="AUS" ClassName="Australia"/><row Code="CAN" ClassName="Canada"/><row Code="GBR" ClassName="UK"/><row Code="IRL" ClassName="Ireland"/><row Code="NZL" ClassName="New Zealand"/><row Code="PAR" ClassName="Partner schools"/>'
select x.t.query('.') as Results from @.xml.nodes('/row') x(t)
/*
Results
-
<row Code="AUS" ClassName="Australia" />
<row Code="CAN" ClassName="Canada" />
<row Code="GBR" ClassName="UK" />
<row Code="IRL" ClassName="Ireland" />
<row Code="NZL" ClassName="New Zealand" />
<row Code="PAR" ClassName="Partner schools" />
*/
|||I have not done much with SQL Server 2000 but with SQL Server 2005 the XML generated with FOR XML is all on one line. However SQL Server Management Studio or Management Studio Express has a built-in XML editor pane where it pretty prints and colorizes the XML for human viewing.|||OK, thanks for confirming this.
|||
I have, I think, the same problem; given N rows, return a recordset with N xml documents.
The 'FOR XML EXPLICIT' looks like the way to go, except that I can't break up the result into distinct rows.
|||Could be that this solution will help;
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1702105&SiteID=1