RE: [xsl] badly need xsl help

Subject: RE: [xsl] badly need xsl help
From: "Randy Oxentenko" <randy@xxxxxxxxxxxxx>
Date: Mon, 13 Oct 2003 12:38:57 -0500
Flashlight / Bruce,

While I can relate to your description of the hustle and bustle of life, I
think your criticism was far out of line.  Take note of who you are talking
to, buy his book, spend a couple of weekends with it, and then you will be
in more of a position to work with and talk about XSL.  Nobody was born
knowing XSL, but most people can learn it with honest effort.  If you don't
have the time or inclination to learn XSL, you are certainly not qualified
to lash out at respectable people in the manner you chose to employ in your
message.  Angry expressions of frustration are not going to convince anybody
to help you, but more likely will prompt them to establish a filter that
prevents them from having to waste time with your messages in the future.
Nobody here is obligated in any way to help any of us, and if they do so, so
much the better for us.  Be thankful for the wealth of free advice available
here, and if you need more than that, then hire a consultant.  The tone,
tenor, and content of the responses to queries here is helpful to ALL
LEVELS, not just experts.  On the other hand, those who obviously have not
done any homework on the subject at hand are not going to get much respect
for wasting valuable time and bandwidth.  Those on "high horses" have earned
a well-deserved position there.  Most of the time, those of us who come with
honest questions in an honest quest to use XSL in the context of our
business problems are treated with respect on this list.  The experts who
share generously of their limited time by answering queries on this list
deserve a very generous amount of respect in return.

Randy Oxentenko

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Bruce
Rojas-Rennke
Sent: Monday, October 13, 2003 12:04 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] badly need xsl help


hang in there ~Mur,

  I have gotten snooty, unhelpful replies too, some people think they were
born knowing this s**t!! Hey- to all you GURU's out there, some of us have a
lot else going on besides this little corner of your XML universe, and maybe
they don't have the luxury of time and slavish devotion to this particular
temple of learning. If you help someone else, they can perhaps help you
someday in an area in which you are under pressure to produce something
fast, but haven't YET leaned everything there is to know. So come down off
your high-horse people, forums are for people like this bloke here, .. and
me. All you people that are too good to suit yourselves should start a new
forum where you can belittle each other and leave this forum to us who are
trying to learn and help everyone at all levels.

- flashlight

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Michael Kay
Sent: Monday, October 13, 2003 10:47 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] badly need xsl help


>   I posted this question here before.
> But I didn't get any
> luck. So trying again with some more details.

You clearly aren't listening to advice. Didn't you see the post a few
days ago about choosing good subject lines that will make people look at
your questions?


>
> In this example, I can't access individual  nodes inside
> RegOptions in the script.

I assume you mean RegionalOptions.
>
> xml:
>
> <data xmlns="urn:schemas.abcd-com:layers">
> 	<Rpt_Inven xmlns="urn:schemas.abcd-com:RepInven" />
> 	<RegionalOptions xmlns="urn:schemas.abcd-com:Static">
> 		<Currency>
> 			<DecimalSymbol>.</DecimalSymbol>
> 			<GroupingSymbol>,</GroupingSymbol>
> 			<DigitGrouping>2</DigitGrouping>
> 		</Currency>
> 		<Locale>1033</Locale>
> 		<Date>
> 			<Calendar>
> 			<TwoDigitYear>79</TwoDigitYear>
> 			</Calendar>
> 			<Separator>-</Separator>
> 			<ShortFormat>3</ShortFormat>
> 		</Date>
> 	</RegionalOptions>
> </data>
>
>
> xsl :
>
> <xsl:stylesheet version="1.0" xmlns=""
> xmlns:lay="urn:schemas.abcd-com:layers"
> xmlns:rep="urn:schemas.abcd-com:RepInven"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> xmlns:msxsl="urn:schemas-microsoft-com:xslt"
> xmlns:scrdt="urn:schemas.abcd-com:datatypes"
> xmlns:stat="urn:schemas.abcd-com:Static">
> 	<xsl:output method="xml" encoding="UTF-8"/>
> 	<xsl:template match="lay:data">
> 		<_Ctrl>
> 			<xsl:call-template name="callInit">
> 				<xsl:with-param
> name="regOptNode" select="stat:RegionalOptions"/>
> 			</xsl:call-template>
>   		</_Ctrl>
> 	</xsl:template>
> 	 <xsl:template name="callInit">
> 		<xsl:param name="regOptNode"/>
> 		<_Item>
> 			<xsl:value-of select="scrdt:init($regOptNode)"/>
> 		</_Item>
> 	</xsl:template>
> 	<msxsl:script language="JScript"
> implements-prefix="scrdt"><![CDATA[
>
> function init(RegOpts)
> {
> 	if( !RegOpts.length) return "length 0";
> 	for( i = 0; i < RegOpts.length; i++ ) {
> 		xDate.init(RegOpts(i));
> 		xNumber.init(RegOpts(i));
> 		var val = RegOpts(i).selectSingleNode("Currency");

You need to do something to tell MSXML what namespace the Currency
element is in (it is in urn:schemas.abcd-com:Static). I don't remember
enough the Microsoft APIs to tell you how to do this, though.

Michael Kay




> //		var val = RegOpts(i).firstChild;
>
> 		if(val!=null)
> 			return val.xml;
> 	}
> 	return "End";
> }
> 	]]></msxsl:script>
>
> </xsl:stylesheet>
>
>     With this xml and xsl, I am expecting my out some thing like
>
> <_Ctrl xmlns="" xmlns:lay="urn:schemas.abcd-com:layers"
> xmlns:rep="urn:schemas.abcd-com:RepInven"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> xmlns:msxsl="urn:schemas-microsoft-com:xslt"
> xmlns:scrdt="urn:schemas.abcd-com:datatypes"
> xmlns:stat="urn:schemas.abcd-com:Static">
> 	<_Item>
> 		&lt;DecimalSymbol&gt;.&lt;/DecimalSymbol&gt;
> 		&lt;GroupingSymbol&gt;,&lt;/GroupingSymbol&gt;
> 		&lt;DigitGrouping&gt;2&lt;/DigitGrouping&gt;
> 	</_Item>
> </_Ctrl>
>
>    But it is always producing something like
>
>    <_Ctrl xmlns="" xmlns:lay="urn:schemas.abcd-com:layers"
> xmlns:rep="urn:schemas.abcd-com:RepInven"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> xmlns:msxsl="urn:schemas-microsoft-com:xslt"
> xmlns:scrdt="urn:schemas.abcd-com:datatypes"
> xmlns:stat="urn:schemas.abcd-com:Static">
> 	<_Item>
> 		End
> 	</_Item>
> </_Ctrl>
>
>
>       I think this b'cos I am not able to get access to the
> <Currency/> node in the script function. And whenever I say
> RegOpts(i).firstChild , I am getting the result I want.
>
> Any ideas about. I am very desperate for this.
>
> thanks,
>
> ~Mur
>
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread