XSL Problem

Hi,
I have the following problem. There are 3 files.

-------------------------------------------------------
a) XML file
  <?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="hall.xsl"?>
  <quizcirclecontests>
     <contest>
        <id>1</id>
        <date>15-Nov-02 to 22-Nov-02</date>
        <participants>
            <name>AS</name>
            <name>JP</name>
        </participants>
     </contest>
     <contest>
        <id>2</id>
        <date>22-Nov-02 to 29-Nov-02</date>
        <participants>
            <name>AS</name>
            <name>DS</name>
            <name>SD</name>
            <name>AS</name>
        </participants>
     </contest>
  </quizcirclecontests>

++++++++++++++++++++++++++++++++++++++++
b) XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">-->
   <xsl:template match="/">
      <html>
         <body>
            <xsl:for-each select="quizcirclecontests/contest">
               <xsl:value-of select="date" />

               <xsl:for-each select="participants">
                  <xsl:choose>
                     <xsl:when test="name">
                        <ul>
                           <xsl:for-each select="name">
                              <li>
                                 <xsl:value-of select="." />
                              </li>
                           </xsl:for-each>
                        </ul>
                     </xsl:when>

                     <xsl:otherwise>- None</xsl:otherwise>
                  </xsl:choose>
               </xsl:for-each>

               <hr />
            </xsl:for-each>
         </body>
      </html>
   </xsl:template>
</xsl:stylesheet>
++++++++++++++++++++++++++++++++++++++++
c) .asp file
    <%
     Dim objXML
     Dim objXSL

     set objXML = Server.CreateObject("Microsoft.XMLDOM")
     objXML.async = false
     objXML.load(Server.mappath("..\xmldata\hall.xml"))

     set objXSL = Server.CreateObject("Microsoft.XMLDOM")
     objXSL.async = false
     objXSL.load(Server.mappath("..\xmldata\hallt.xsl"))

     Response.Write(objXML.transformNode(objXSL))
    %>
-------------------------------------------------------------

The problem is I don't get to see the XSL parsed output from the asp. The
asp file shows the XSL file as it is.
http://www.quizcircle.com/times/test.asp

Is however I open the XML file directly, it's fine.
http://www.quizcircle.com/xmldata/hall.xml

Again,  if the XSL namespace is set to <!--<xsl:stylesheet
xmlns:xsl="http://www.w3.org/TR/WD-xsl">-->
the output shows up from asp.

Am I missing something?

-- 
----------------
Cheers,
Rajiv Das


0
11/5/2003 9:18:25 AM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
739 Views

Similar Articles

[PageSpeed] 6

"Rajiv Das" <rajiv__nononospam__das@msn.com> wrote in message
news:%238D2C33oDHA.2808@TK2MSFTNGP10.phx.gbl...
> Hi,
> I have the following problem. There are 3 files.
>
> -------------------------------------------------------
> a) XML file
>   <?xml version="1.0" encoding="UTF-8"?>
>   <?xml-stylesheet type="text/xsl" href="hall.xsl"?>
>   <quizcirclecontests>
>      <contest>
>         <id>1</id>
>         <date>15-Nov-02 to 22-Nov-02</date>
>         <participants>
>             <name>AS</name>
>             <name>JP</name>
>         </participants>
>      </contest>
>      <contest>
>         <id>2</id>
>         <date>22-Nov-02 to 29-Nov-02</date>
>         <participants>
>             <name>AS</name>
>             <name>DS</name>
>             <name>SD</name>
>             <name>AS</name>
>         </participants>
>      </contest>
>   </quizcirclecontests>
>
> ++++++++++++++++++++++++++++++++++++++++
> b) XSL file
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <!--<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">-->
>    <xsl:template match="/">
>       <html>
>          <body>
>             <xsl:for-each select="quizcirclecontests/contest">
>                <xsl:value-of select="date" />
>
>                <xsl:for-each select="participants">
>                   <xsl:choose>
>                      <xsl:when test="name">
>                         <ul>
>                            <xsl:for-each select="name">
>                               <li>
>                                  <xsl:value-of select="." />
>                               </li>
>                            </xsl:for-each>
>                         </ul>
>                      </xsl:when>
>
>                      <xsl:otherwise>- None</xsl:otherwise>
>                   </xsl:choose>
>                </xsl:for-each>
>
>                <hr />
>             </xsl:for-each>
>          </body>
>       </html>
>    </xsl:template>
> </xsl:stylesheet>
> ++++++++++++++++++++++++++++++++++++++++
> c) .asp file
>     <%
>      Dim objXML
>      Dim objXSL
>
>      set objXML = Server.CreateObject("Microsoft.XMLDOM")
>      objXML.async = false
>      objXML.load(Server.mappath("..\xmldata\hall.xml"))
>
>      set objXSL = Server.CreateObject("Microsoft.XMLDOM")
>      objXSL.async = false
>      objXSL.load(Server.mappath("..\xmldata\hallt.xsl"))
>
>      Response.Write(objXML.transformNode(objXSL))
>     %>
> -------------------------------------------------------------
>
> The problem is I don't get to see the XSL parsed output from the asp. The
> asp file shows the XSL file as it is.
> http://www.quizcircle.com/times/test.asp
>
> Is however I open the XML file directly, it's fine.
> http://www.quizcircle.com/xmldata/hall.xml
>
> Again,  if the XSL namespace is set to <!--<xsl:stylesheet
> xmlns:xsl="http://www.w3.org/TR/WD-xsl">-->
> the output shows up from asp.
>
> Am I missing something?
>
> -- 
> ----------------
> Cheers,
> Rajiv Das
>
>
A few things, try the progid "Msxml2.DomDocument.3.0" if this doesn't work
install the version 3 parser, better still the version 4 parser and update
progid to "Msxml2.DomDocument.4.0".
If using version 3 use setProperty method to set selection language to
"XPath" as detailed in help file for ms parser.
As you are not using .Net this sort of question should be posted in
"Microsoft.public.xsl".
-- 

Joe (MVP - xml)


0
joefawcett (14)
11/5/2003 9:54:47 AM
Thanks Joe, it worked. I had the MSXML all along, but it was not getting
invoked. Using the Msxml2.DomDocument.4.0 namespace solved it.

Thanks again.
-- 
----------------
Cheers,
Rajiv Das
"Joe Fawcett" <joefawcett@hotmail.com> wrote in message
news:uSWG7L4oDHA.1884@TK2MSFTNGP09.phx.gbl...
> "Rajiv Das" <rajiv__nononospam__das@msn.com> wrote in message
> news:%238D2C33oDHA.2808@TK2MSFTNGP10.phx.gbl...
> > Hi,
> > I have the following problem. There are 3 files.
> >
> > -------------------------------------------------------
> > a) XML file
> >   <?xml version="1.0" encoding="UTF-8"?>
> >   <?xml-stylesheet type="text/xsl" href="hall.xsl"?>
> >   <quizcirclecontests>
> >      <contest>
> >         <id>1</id>
> >         <date>15-Nov-02 to 22-Nov-02</date>
> >         <participants>
> >             <name>AS</name>
> >             <name>JP</name>
> >         </participants>
> >      </contest>
> >      <contest>
> >         <id>2</id>
> >         <date>22-Nov-02 to 29-Nov-02</date>
> >         <participants>
> >             <name>AS</name>
> >             <name>DS</name>
> >             <name>SD</name>
> >             <name>AS</name>
> >         </participants>
> >      </contest>
> >   </quizcirclecontests>
> >
> > ++++++++++++++++++++++++++++++++++++++++
> > b) XSL file
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsl:stylesheet version="1.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > <!--<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">-->
> >    <xsl:template match="/">
> >       <html>
> >          <body>
> >             <xsl:for-each select="quizcirclecontests/contest">
> >                <xsl:value-of select="date" />
> >
> >                <xsl:for-each select="participants">
> >                   <xsl:choose>
> >                      <xsl:when test="name">
> >                         <ul>
> >                            <xsl:for-each select="name">
> >                               <li>
> >                                  <xsl:value-of select="." />
> >                               </li>
> >                            </xsl:for-each>
> >                         </ul>
> >                      </xsl:when>
> >
> >                      <xsl:otherwise>- None</xsl:otherwise>
> >                   </xsl:choose>
> >                </xsl:for-each>
> >
> >                <hr />
> >             </xsl:for-each>
> >          </body>
> >       </html>
> >    </xsl:template>
> > </xsl:stylesheet>
> > ++++++++++++++++++++++++++++++++++++++++
> > c) .asp file
> >     <%
> >      Dim objXML
> >      Dim objXSL
> >
> >      set objXML = Server.CreateObject("Microsoft.XMLDOM")
> >      objXML.async = false
> >      objXML.load(Server.mappath("..\xmldata\hall.xml"))
> >
> >      set objXSL = Server.CreateObject("Microsoft.XMLDOM")
> >      objXSL.async = false
> >      objXSL.load(Server.mappath("..\xmldata\hallt.xsl"))
> >
> >      Response.Write(objXML.transformNode(objXSL))
> >     %>
> > -------------------------------------------------------------
> >
> > The problem is I don't get to see the XSL parsed output from the asp.
The
> > asp file shows the XSL file as it is.
> > http://www.quizcircle.com/times/test.asp
> >
> > Is however I open the XML file directly, it's fine.
> > http://www.quizcircle.com/xmldata/hall.xml
> >
> > Again,  if the XSL namespace is set to <!--<xsl:stylesheet
> > xmlns:xsl="http://www.w3.org/TR/WD-xsl">-->
> > the output shows up from asp.
> >
> > Am I missing something?
> >
> > -- 
> > ----------------
> > Cheers,
> > Rajiv Das
> >
> >
> A few things, try the progid "Msxml2.DomDocument.3.0" if this doesn't work
> install the version 3 parser, better still the version 4 parser and update
> progid to "Msxml2.DomDocument.4.0".
> If using version 3 use setProperty method to set selection language to
> "XPath" as detailed in help file for ms parser.
> As you are not using .Net this sort of question should be posted in
> "Microsoft.public.xsl".
> -- 
>
> Joe (MVP - xml)
>
>


0
11/5/2003 10:47:42 AM
Reply:

Similar Artilces:

Copy Picture problems
I've written a macro which copies a selected range in Excel 2000 and and paste it as picture in Power Point. CopyPicture is used and the macro works OK apart from that all columns are not always included in the pasted picture. Grouped columns and selection of visible cells only is used in Excel. e.g from Range A1:Z15 12 visble columns are selected. A different number of columns can be included in the pasted picture when different users runs the macro. Thanks in advance for any help. Mats "MatsN" <MatsN@discussions.microsoft.com> wrote in message news:2A8F...

Problem about the data refer path.
Hi All, I do all the work on the network driver, says L:. For example, I have a excel file on the L driver, named XXX.xls. One field in the file is refer to a field in another file on the L driver in following path: L:\aaa\bbb\ccc.xls. But do not know when i find that this field in XXX.xls refer to a local file : C:\documents and setting\username\application data\microsoft\excel\xlstart\aaa\bbb\ccc.xls. Anybody who knows that problem, could help me. Thanks so much in advance!!!! Thanks a lot. Yue One way to handle this (if it's possible) is to have all of your related files in...

Big Problem Sending #2
Out of the blue on Thursday, Outlook stopped sending my email. It's just racking up in my outbox. I checked all the regular stuff several times (tools-accounts-servers- smtp) and that all seems correct. I even spent over an hour on the phone with SBC today, and they say the server is fine and tried some troubleshooting activities to try to help, to no avail. I'm losing my mind and I NEED HELP! I'm going to start losing clients if I can't get my email sent out. Please Help! (if no one can halp, can someone tell me who to ask or where to go to ask in Microsoft) I'm ...

any problems getting msnhotmail messages through outlooK?
I'm going away and want an out of office feature. I'm thinking of setting myself up through outlook but have msn hotmail. Are there any problems with doing this? Sandy Hirsch If you're a new hotmail 'customer' you wont be able to get your messages with Outlook. If you've had a hotmail account for at least a few months you should be able to get all your email with outlook. Its real simple, even easier than setting up a regular account. -James "Schwartz" <Schwartz@discussions.microsoft.com> wrote in message news:7B7EA122-7661-4350-8709-0376C1885EAC...

SmartList Builder problem with go to on SOP Entry
I've followed the steps from KB914894 to build a go to for the SOP Transaction Entry window. When that window opens it shows the SOP Type and SOP Number values that were passed and it shows the line item info but no other header info is shown. Any ideas? Additionally we have the Ship-To Address ID field disabled through Field Level Security for some users. When those users try to use this go to they get an error message about permissions on this field. Any options here? Thanks. -- Jim@TurboChef ------=_NextPart_0001_A4B6268B Content-Type: text/plain Content-Transfer-Encoding:...

Windows 7 64 bit and shortcuts problem
Sometimes when I install a program, I try to make a desktop shortcut, but it wont appear on the desktop. I try to create one myself, but when I drag it to the desktop it seems to go into never, never land. What could cause this? Tony Tony, Please describe exactly what happens when you drag the exe file to the desktop so that we can think of a creative answer. I assume you are "right" dragging the exe to the desktop and choosing "create shortcut", right? What happens then? :) Carlos "Anthony Lisanti" wrote: > > > Some...

upgrade problems from 1.0 to 1.2
After upgrading from 1.0 to 1.2 CRM I now received the following error, see bottom of message. The upgrade seem to run smoothly - no visible errors. I noticed that the framework still shows 1.0 shouldn't it be 1.1? Server Error in '/' Application. ----------------------------------------------------------- --------------------- Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Me...

Data refresh problem
I downloaded an xl template worksheet which has links to MSN Money website (for updating stock prices) As I have xl97, and the worksheet was created in a later version, I saved it as a xl97 worksheet. When I 'refresh data' it downloads the latest prices.........sometimes. More usually I get the message 'xl has encountered a problem, and needs to close..' Any ideas on what might be causing this? If I knew how the link works, I could start with a new worksheet, but I can't find any web queries relating to this worksheet. Brickcounter Brickcounter, If you know where a...

Portfolio Manager the same old Problem
Hi After opening 2 tickets, number of unanswered emails and waiting for 2 months I still didn't received final respond from MS Tech Support. So much for free support. This is how we leaned ... See problem description below. This problem starts some where around Money 2003. I am thinking about going back from my 2006 version to 2003 or 2004 version. I found a couple of messages on this site, from people who had the same problem. Does any body know for sure, what was the last version that didn't have this problem - 2002, 2003, 2004, so I can try to reinstall it in place of 2006? Pr...

font printing problem of imported visio file inside power point file
I am having a problem with VISIO 2002 with PowerPoint 2000. I made a drawing with some fonts with VISIO 2002. Then I copied the drawing and pasted into PowerPoint file. In screen, I can clearly see the font. When I print the file, drawings are there but there are no font from printed paper. Would you please help me out regarding this problem? ...

GP10 Security Problem with HR
I have a user set up as HRDEFAULTUSER, HR MANAGER and HR STAKEHOLDER. When he tries to log in he gets a GET/CHANGE eoor on coProcess. And it says it can not perform operation in this security context. GP closes, but the user is added to the activity table. Where is the security setting for coProcess? ...

Exchange 2003 Security problems
Hi there, Can anyone please tell me what security permissions the exchange enterprise servers must have to Active Directory AND where I can look to verify that it is there? My 3 exchange servers loose there security rights and must do a domainprep every 8 hours to restore the security. I get the following on the exchange servers: Process STORE.EXE (PID=3456). Exchange Server sample.local does not have Audit Security Privilege on Domain Controller sample.local This Domain Controller will not be used by DSAccess. . PLEASE HELP?? Thanks Hens Hens You need to find out why this is happe...

Problem with hyperlink
Hi, When attempting to activate a web page using a hyperlink in Excel 2003, I get a message: "Opening"javascript:OWSize ("PR_Popup",http://racingpost.co.uk/horses/trainer_form.sd?trainer_id=693&code=Flat,620,480,'no','yes','yes')" Hyperlinks can be harmful to your computer data. To protect your computer, click only those hyperlinks from trusted sources. Do you want to continue. YES NO When I click YES a web page appears for a split second and then closes. I turned off Pop up blocker but this did not solve the problem. Why am I havi...

Problem with records affected
I'm inserting into a database and need to know the number of records that where entered and the number of errors, using this With CurrentDb .Execute strSQL_insert If Line_Number = 80 Then MsgBox (.RecordsAffected) End If If .RecordsAffected = 1 Then Good_Records = Good_Records + 1 Else Bad_Records = Bad_Records + 1 End If End With But the recordaffected comes out with 0. Thanks Suggestions: 1. Use a Database variable, so you can set it to Nothing again at the end. 2. Use dbFailOnError so you can...

problems with outlook 2003 #4
outlook 2003 keeps restarting, stating that it has encountered a problem and is restarting... any suggestions ? ...

Date Serial Problem
I have a querry in which I am using the Date Serial in the querry criteria as follows Between DateSerial([Enter Year:],[Enter Month:],1) And DateSerial([Enter Year:],[Enter Month:]+1,0) the result i get is for a a perticular month in a year. What I want is: 1. if i want to get the results between june to november 2009. how can i do it? 2. If i want to get the restult of 2008 only e.g. from 01 Jan 2008 (or any year) upto 31 December 2008. This should give result only for 1 year only. not by months like from june 2008 to june 2009 Please help me fix this querry ...

Outlook 2003 Sent item problem
My problem is I can send a new message, it goes to the outbox, it is not assigned a date, when send recieve is carried out it does not go. If I forward this same message it transmits properly. What are your send/receive settings for this account? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Greg D asked: | My problem is I can send a new message, it goes to the...

Chart 'crowding' problem. Chart suddenly overlaps axis text.
My manager created several chart sheets on his system (currently Windows 2000, Excel 2002 I'm pretty sure...he's in a meeting so I can't get his SP#). The charts look good, have a couple added lines to split the quarter visually into three months (the X-axis is the day of the quarter), and it displays both X- and Y-axis labels. When I open them on my system (Windows XP, Excel 2002 SP 2) they look fine. But the following day when I open the workbook the charts are now a little larger and are overlapping the axis labels...very annoying! Any idea why this is happening? The workb...

Creeping Oulook connectivity problems
Hey folks, Looking for help/ideas here. Smallish office, 25 users or so. Exchange 5.5 running on NT4 (we can't/won't deal with AD) on good hardware--dual 2 Ghz Xeon Dell with 4 GB of RAM, mirrored RAID for the OS RAID 5 for the mail store. We spam filter on our mail relay (in our DMZ) using spamassassin and a few other tools and use Trend Scanmail on the Exchange server to scan for viruses. Clients are all XP Pro SP2, Outlook 2002, firewall off (we have a Cisco PIX that we know better than some relatives), and our network is remarkably high performing and clean. Management is very goo...

OLE Problem on Opening
Hi All, I have searched everywhere but cannot find a solution to this. I have a c.6mb .xlsb file (c.60mb in .xls) which I am trying to open in xl 2003. However everytime I try to open it it starts to convert the file then just gives me the following warning "microsft Excel is waiting for another application to complete an OLE action" I have no other programs open when I try this, any help would be greatly apprecaited. Thanks. Chris Are there macros in the workbook? First try to open the workbook with macros disabled (using medium security mode) and see if the ...

Problem shutting down Outlook 2003
OL 2003 SP2 MS XP Pro SR2, All updates installed... Upon doing a File-->Exit, Outlook.exe stills appears in task manager, jumps to 99% CPU, Mem Usage exceeds 14k. Outlook appears to close properly at UI level. Machine slows down due to Outlook.exe not "ending". I must manually kill Outlook.exe via task manager. At first, I thought I got nailed with spyware/adware/virus ... turns out that Outlook.exe will not shut down. Did Spybot sweep/ virus sweep ... all clean... Any ideas? Thank you in advance for your input. -- Grumpy Aero Guy Grumpy Aero Guy <fb@beerme....

text mask problem
A2k. I'm using the following to mask an unbound text box so that the user can ONLY enter 50 characters: CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC I seem to recall this is a problem with access since this also means that editing in that control means that typing in the middle of the string overwrites characters regardless of the how the keyboard key "Insert" is set (on or off). I need to limit the # of charactes AS the user types. I do NOT want to Trim the characters afterward, nor do I want to pop up some lame warning in the BeforeUpdate event or in the ValidationRul...

Problem with deleting COM object
I have made an ATL COM which uses classes from an MFC extension DLL. Everything works great until I try to delete a pointer (to an object defined in the extension DLL) to an object from within the destructor of the COM object. When exiting the destructor of the object I get the following error: Invalid Address specified to RtlValidateHeap( 7f0000, 7c7088 ) All involved EXE and DLL's are built using Debug MultiThreaded DLL Anyone have a solution to this? -- Helge "Helge Opg�rd" <helgeo@hotmail.com> wrote: > I have made an ATL COM which uses classes from an MFC...

Really weird SMTP Connecotr problem
On my own server I have the following problems: - Mail is received by the SMTP virtual server. It then doesn't appear in the private store. It just seems to disappear. - If I mail myself in Outlook, the mail sent is stored in the private store, but it doesn't show back up in Outlook. The number of items shown in the private store only increases by 1, where instead it should be 2 (1 in sent and 1 in inbox). My conclusion to this is that the SMTP connector receives the mails, but then doesn't do anything with it. How do I fix this. Does anyone have any pointers as to where to...

Problems with VC 6 (SP3)'s MFC and WinXP (SP2)
After updating my XP Pro box to Service Pack 2, our software is throwing debug asserts in MFC wincore.cpp. Basically, I have a CFileDialog derivative, which subclasses some common dialog controls, such as the OK button. When the file dialog closes, the OK button subclass is not notified, so MFC doesn't unhook itself. Later, when the dialog instance is destructed, and hence the OK button member instance is destructed, the assert is thrown indicating that either the m_hWnd should have been NULL or the window should still exist for the class instance to destroy. But at this point, th...