xsl transform issue

Discussion in 'General troubleshooting' started by davidmclusa, Mar 2, 2010.

  1. OK, this is a strange one.

    b/4 I get too far, this is an existing app, works on previous hoster, works on my Win7-IIS 7 box, but does NOT work on Winhost -- and the question is why...

    I have a client site that uses xml documents, xsl to transform them to 'text' that is then databound to an asp:xml control in a user control.

    The page reads through an 'article list' xml document, where it gets the @doc value for the month desired, and then goes to that specific document to get the title, an article summary, etc.

    Since I get the page and the article section headers - but no article information, the apparent failure point is at the statement...

    <xsl:apply-templates select="document(@doc)/article/title">

    There are 3 pages that use a similar technique, and all 'fail' to get the document info (although there is no error message) at the 'select document' point. All other xml/xsl pages without the 'select document' work as expected.

    I've checked to the extent I could and the setup for IIS on my box looks to be the same as what I can see on Winhost CP & IIS manager for the clients Winhost account.

    This is still a 'temp' account, but I thought I'd throw it out here before making a support request.

    Anybody have any ideas?

    Last edited by a moderator: Oct 14, 2015
  2. Ray


    What is the error you are getting?
  3. as i mentioned -- none

    Otherwise I might have a clue -- or not -- where to look
  4. Ray


    I want to see this application. You got a URL for me to look at? Can you give me some directions on how to replicate this on my end? If this requires a login, can you offer me a test account to use?
  5. The only other somewhat unusual thing this app does is use viewstate to keep track of some variables, but again, I checked and viewstate is 'on' in the IIS setup.

    to look at the app, go to


    click on the 'complimentary issue' and you'll see the section headings - sans info -- but if you click on the same section name in the left column the article will come up (unless you select one of the sections in the comp. issue that has multiple articles -- it uses the same 'non-working' select doc technique. But the reason I mention it is that the articles that display are the same documents that are accessed to get the short blurb used in the article list -- so the data is definitely there.

    to see what it should look like when clicking on the 'complimentary issue' -- go to
    www.mexico-insights.com -- and do the same there


    Last edited by a moderator: Oct 14, 2015
  6. Ray


    With your section headings, are they being pulled from your database? Can you verify and check that it is looking to the correct database. You may want to check what connection string name 'complimentary issue/section headings' is calling on.
  7. sigh...

    There is NO database involved -- those headings are pulled from an XML document.

    There is one xml document (articlelist.xml) that has a list of articles, with the format like...

    <?xml version="1.0" encoding="utf-8" ?>
    <section key="feature" name="Feature Article">
    <period issue="201012" doc="201012/feature-article12.xml"/>
    <period issue="201011" doc="201011/feature-article11.xml"/>
    <period issue="200601" doc="200601/feature-flutter.xml"/>
    <section key="fromeditors" name="From the Editors">
    <period issue="201012" doc="201012/editor-dec10.xml"/>
    <period issue="201011" doc="201011/editor-nov10.xml"/>
    <period issue="200601" doc="200601/editor-jan06.xml"/>

    The program gets the section name, and the appropriate @doc for the month issue requested, then it does the...

    <xsl:apply-templates select="document(@doc)/article/title">
    <xsl:apply-templates select="document(@doc)/article/author">
    <xsl:apply-templates select="document(@doc)/article/blurb">

    .... to get the document content title, author, and short intro

    But just to let you know, I was pointed at your database when I tested on MY win7-iis7 box & it worked fine.
  8. Ray


    I'm really not sure why this wouldn't work "select="document(@doc)/". I can only suggest make a simple app that connects to your xml file, maybe place it in another app folder and try to test it out from there. Some times creating some thing simple will weed out all the excess code your main app may be holding.
  9. You seem to be missing an essential point -- the application runs fine, as-is, in 3 other environments iis5.1 - xp pro, iis6 - win server 2003, iis7 - win7 ultimate.

    If it works fine in 3 other environemnts, without a problem -- it's NOT the application -- it's the environment.

    ... and the app is already as simple as it can be.

    There is something in your environment that is not handling the transform, whether it's an xml parser issue, some environmental setting, or what, I don't know, but trying to point it out as an app issue, when it works fine in other environments, is a pretty weak response.

  10. Ray


    This is misleading. You seem to have an impression that because it works on another server it will work on our server. Remember that our server is setup as a shared hosting environment. So the root is actually a virtual application folder. And there maybe some security settings we cannot implement like you would do on your own local computer because it is not feasible on our end. But all in all the installation of this Windows 2008/IIS 7 server is a stanard installation just like anything else. This is not a customized OS that Microsoft gave us, it is the same OS that you yourself will buy from Microsoft.

    Now with 3rd party applications, then yes, in general we just don't install any 3rd party application on the server. Thats because we will not know the effect on the other sites on the server. But this is standard XSLT so really it should be the same as what you have on your computer. I can only come up with the major difference between your computer and our server is the way the folders are structured. And going back to your first thread...

    There are 3 pages that use a similar technique, and all 'fail' to get the document info (although there is no error message) at the 'select document' point. All other xml/xsl pages without the 'select document' work as expected.

    I keep coming to how the path of ...


    ...is setup. That is why I suggested you created a simple app using this path method and play around with it. Its simpler to test out the path with a simpler application then going through your entire site.
  11. Correct.

    But there is a common assumption that if it doesn't work here there is something inherently wrong with our platform, and that is not the case.
    Your development environment and a production shared hosting environment are very different.
    Assuming that because something works on a default IIS setup on your computer, it should work in a production environment is, unfortunately, incorrect.

    To expand on what Ray said, there is no way to completely replicate a shared production environment on your development system, so you have to be prepared to adapt. And that doesn't just apply to Winhost. Every Windows host is going to have a slightly different environment. Some will be closer to the default on your development box (which is another subject, because that's not a good thing in a shared environment), others are going to be quite different.

    As a developer it falls on your shoulders to learn how to adapt your work to a shared environment. As you can see, we will help whenever we can, sometimes in great technical detail. Other times we are not going to be as much help. It depends on what you're doing and how common it is. How often we've seen it. There will be times when you have to research things on your own to find solutions. If you then take the time to post those solutions here, everyone benefits.
    Last edited: Oct 14, 2015
  12. But guys, you make 3 incorrect assumptions in your responses;

    1) That all 3 environments were local -- wrong, the win2003/IIS6 IS a shared environment -- with one of your competitors that I came from -- and it worked there both as an application root AND in a sub-folder application for over 3 years.

    2) That I hadn't already verified that all the data (re: path, document existence, etc.) was correct before I even posted a question here.

    3) That I thought there was something WRONG with your environment, That's NOT what I said -- what I said was that the issue was with the environment -- that just means it's different, not necessarily BAD. Maybe it is, maybe it isn't -- that's not the point.

    The point is that the only variable in the equation IS the environment.

    And your responses that only refer to the application as a problem seemed to ignore that fact and indicate that I should change the app.
    Why, if I don't know WHAT the issue is and it worked before, would I change anything?
    My frustration is that you seemed to ignore the whole concept of investigating your side of the equation.

    My post was to elicit WHAT is the difference to see if it can be changed or how I can change my application (hopefully minimally) to work in your environment. And you immediately took it as an assault -- what's that about.

    But I tell you what IS BAD -- is your response. The next time you reply like I'm an idiot I'm outta here, and so are my clients. No one can know everything, I may be ignorant about IIS7 and Server 2008 because they are new to me -- but I'm not stupid.

    I've been in IT for 30+ years, from mainframes, minis, pcs, computer-telephony, etc -- I've held every position from computer operator to IT Director to CTO.

    I think I've adapted over the years -- I suggest YOU adapt to the fact that you may have clients that have some knowledge and experience.
  13. I said it is a common assumption. Forum posts are read by a lot of people, so sometimes the statements may apply to more than just the original poster. I wouldn't have said that in a support ticket, which is more of a one on one conversation. No offense intended.

    We have no way of knowing how your other servers/platforms are configured, so we can't make any suggestions about what may need to change. When there is an error message it's usually apparent what's wrong. Without an error it could be any number of things, and it's not something we can troubleshoot.

Share This Page