Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsXMLXMLXSL Document() functionXSL Document() function
Previous
 
Next
New Post
8/9/2007 11:15 AM
 

I'm trying to use the XSL document() function in my xsl stylesheet to include an external xml file. I was able to get this to work in the News Feeds (RSS) module but when I try the same xsl in the XML/XSL module I get an error:

System.Xml.Xsl.XslTransformException
Execution of the 'document()' function was prohibited. Use the XsltSettings.EnableDocumentFunction property to enable it. An error occurred at C:\Inetpub\wwwroot\DotNetNuke4a\Portals\0\test2.xsl(6,5).

I know just enough to be dangerous with .NET but I'm wondering if it is possible to enable the XsltSettings.EnableDocumentFunction? How and where would I do that?

 
New Post
8/9/2007 3:24 PM
 

I thought it might help to explain what I'm trying to do because maybe I'm going about it the wrong way. On Page A I have a list of article titles generated and displayed via the RSS module. When you click a title I want it to go to Page B and display the contents of the article that was clicked. This content is also in an xml document. What I was hoping to do was pass a URL var that would be the source document name or URL and then use the xsl document function to load the xml doc and display it.

These articles are in our existing CMS so I can do a certain amount of hard coding as far as the URL but the actual xml file name will be variable depending on what title is clicked.

 

 

 
New Post
8/9/2007 3:55 PM
 

Well, I'm confused.  The newsfeed module does not generate a newsfeed, but requests it, and then transforms it for presentation.  Now, if your transformation is the defualt DNNv091.xsl then, then clicking on the title would result in redirecting the user to the link given in the newsfeed source.  I guess, I'm wondering where you are getting the source of your newsfeed, and what xsl file is transforming it. 

The error you are getting is probably due to the newer XslCompiledTransform class  that was introduced in the latest versions of the XML/XSL module.  See this post for some information: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/59/threadid/121322/scope/posts/Default.aspx. I was using includes, and scripting in some xsl files w/o issue in the previous version.  When I started using the new version, they broke.  Stefan explained the issue rather well, and I was able to work through making changes to do away with the embedded scripts and includes.  While the issue for me was more related to scripting, it may affect using other functions like includes, not entirely sure, but you might want to take a look at the discussion, and the reference sites in that post.  As for why you can do this type of thing in the NewsFeeds (RSS) module, well - that module's not working the same, and has not been updated, so they are a bit different.

I think you can eventually get passed the current issue, as that's really the way RSS works, so let me know the above 2 items, and I'll see what I can do to help.

Cheers

 

 
New Post
8/9/2007 4:31 PM
 

If I understand you correctly, you have two XML sources,
one contains a "product catalog", the second one "product details"

Both can be displayed using the XML module. Setup one page for the catalog, the second one for the detail on a second page. You will pass the ProductID via querystring to pageB.

Now you can add the value of the querystring as new querystring parameter to the detail source or/and you can pass it as XSL argument to your stylesheet. 

 
New Post
8/9/2007 8:47 PM
 

Sorry I was in a hurry and didn't explain myself very well :) The source of the newsfeed is a RSS1 feed generated by our current CMS. Since the format is RSS1 I wrote a custom xslt stylesheet to transform it. It presents great using the News Feed (RSS) module and I tried to convince everyone that with RSS you are supposed to go to the source web site to view the full content but we are trying to match the current functionality of our old CMS and these specialized feeds display the full article content without going out to the source. It's kind of hybrid RSS so that one site on our CMS could share content with another site on our CMS but make it look like the content was their own. It's a specialized thing that will only be used on our system so that's why I'm trying to get it to work this way (plus sales showed them how it works on the current CMS and of course that is what they are expecting in DNN too).

I'm the first to say it ain't pretty but it's what I'm stuck with.

So here's a simplified version of what I'm working with and how I need it to function:

DNN PageA displays a list of linked titles pulled from ExternalSite/list.xml and formatted with local/mycustom.xsl

When a user clicks Title A it needs to go to DNN PageB and display contents of ExternalSite/articleA.xml formatted with local/morecustom.xsl
when a user clicks Title B it needs to go to DNN PageB and display contents of ExternalSite/articleB.xml formatted with local/morecustom.xsl
when a user clicks Title C it needs to go to DNN PageB and display contents of ExternalSite/articleC.xml formatted with local/morecustom.xsl
etc., etc., etc.

My initial idea was that I could format the link in local/mycustom.xsl to go to DNN PageB passing with it a url var containing which ExternalSite/article[foo].xml to load. On DNN pageB the XML/XSL module would use a dummy.xml file and local/morecustom.xsl which would look for the url var and use the document() function to pull it in to the xsl and display it. But since that function doesn't work...I'm kind of stuck. Any ideas would be greatly appreciated.

 

 

 

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsXMLXMLXSL Document() functionXSL Document() function


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out