Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  XML Module [Lea...  XSL Document() function
Previous Previous
 
Next Next
New Post 8/9/2007 8:15 AM
User is offline emeade
3 posts
10th Ranked


XSL Document() function 

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 12:24 PM
User is offline emeade
3 posts
10th Ranked


Re: XSL Document() function 

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 12:55 PM
User is offline iwonder
457 posts
wizzodawg.blogspot.com/
8th Ranked


Re: XSL Document() function 
Modified By iwonder  on 8/9/2007 3:58:25 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 1:31 PM
User is offline Stefan Cullmann
1486 posts
6th Ranked








Re: XSL Document() function 

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. 


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com

forms & Lists (UDT5.0) will be the next major release of the User Defined Table project.
A first Preview is available, though it requires DotnetNuke 5 (Beta 5).

Need to import external data to a UDT? Try http://www.codeplex.com/Csv2UDTImport

 
New Post 8/9/2007 5:47 PM
User is offline emeade
3 posts
10th Ranked


Re: XSL Document() function 

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 Previous
 
Next Next
  Forum  DotNetNuke® Pro...  XML Module [Lea...  XSL Document() function
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNN Photo Gallery
Complete Photo Gallery Management!
www.dnnPhotoGallery.com
R2i - Delivering Serious DNN Services & Solutions
Award Winning Design, Skin construction, Custom Modules and Consulting Services for the Enterprise organization. R2i is the DNN:Map module Project Lead and one of the largest DNN service providers with offices in New York City, Virginia and Baltimore.
www.bi4ce.com
"SalarO" Skinning Graphic Design Branding Services
SalarO develops packaged & custom skins for your DNN at prices you can afford. SalarO is also developing Module development, Hosting, Branding/Logo design as well as Content Transfer Services to complement the core skinning solutions.
www.salaro.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP