XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Posttop
Paul HempsallSubject: .net 1.1 incorrectly processing HREF element in XSLT file
Author: Paul Hempsall
Date: 26 Sep 2006 07:04 AM
Originally Posted: 26 Sep 2006 06:59 AM
Sorry in advance for the lengthy post, but I want to provide as much info to this problem as possible...

I'm using asp.net with the 1.1 framework to process an XML file into an XHTML output. Almost all of the page is transformed correctly, except for an irregular number of HREF elements that form a list of Promotions on the right of the page.

All of the HREF elements in question are wrapped around IMG elements, and are themselves wrapped by P elements:

<p><a href="example.html"><img src="images/dynamic/authoring.jpg" alt="Some text" /></a></p>

For some bizarre reason, two of these Promos refuse to produce a valid HREF (see output below):

<a ><img src="images/dynamic/futurewest.jpg" alt="Visit Future West Final Report" /></a></p>

<a ><img src="images/dynamic/ywlp.jpg" alt="Visit Young Women's Leadership Program (external website)" /></a></p>

The relevant extract of the .Net code used to transform the file follows:

Dim sw As StringWriter = New StringWriter
Dim xslt As New XslTransform
xslt.Load(XSLPath)
Dim resolver As New XmlUrlResolver
resolver.Credentials = System.Net.CredentialCache.DefaultCredentials
xslt.Transform(XMLDoc, Nothing, sw, resolver)

The Resolver assists the XSL file in finding an external document that allows it to produce the site navigation. This process and 99% of all other page transforms work correctly.

I've tried replacing the P element with an unordered list, but this resulted in the same issue.

The only way I can get the HREF element to process correctly on these problem Promos is to replace the IMG element with text.

I've tried processing this with MSXML, MSXML4 and Stylus Studio 2007's built in processor. Each of these processors have produced the correct output. However as soon as the code is run through the web server it fails. I've tried on both the remote web server and my local IIS 5.1 installation.

Googling for this problem hasn't produced any fruitful results.

I've attached my XSLT and XML in a ZIP file, as the files are too large to reproduce in a post.

The temporary web address for this project is http://www.wsroc.com.au.neptune.domain-preview.com/ with the problem Promos on the right being "FutureWest" and the "Young Women's Leadership Project" (last promo).

I would be sincerely grateful if someone can point me in the right direction.


Documentnews_page.zip
XML and XSL files

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.