XSLT validation

Reposting since this forum might be more appropriate for my question.

I have written a simple piece of code in C# that takes a xml file as input, 
applies a xsl transform and outputs a xml file.

I want to validate my output xml file against the xsl file to verify that 
the output is as expected. How can i do this?

Thanks in advance!

0
KL (9)
2/9/2005 10:27:04 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
752 Views

Similar Articles

[PageSpeed] 18


KL wrote:


> I have written a simple piece of code in C# that takes a xml file as input, 
> applies a xsl transform and outputs a xml file.
> 
> I want to validate my output xml file against the xsl file to verify that 
> the output is as expected. How can i do this?

You can validate the XML output against a DTD or schema, I don't 
understand what you think a validation of an XML file against an XSL 
file would do.

-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
2/10/2005 11:52:41 AM
Reply:

Similar Artilces:

How xslt
Hi all, I have one xml doc like this <test> <orders> <order id='111' typeid='1'> <amount>300</amount> </order> <order id='112' typeid='2'> <amount>300</amount> </order> </orders> <types> <type id='1'> <name>toy</name> </type> <type id='2'> <name>food</name> </type> </types> </test> I want to use xslt to transform it into a new xml -- <test> <orders> <orde...

data validation errors messages
I've created a datasheet that will be used in conjuction with th PivotTable function of Excel 2002. Knowing that data inconsistency i can be troublesome, I've added Data Validation wherever I can in th data sheet. The first column's validation requires exactly an 11 digi entry and a STOP error message if anything more or less appears. I works as intended. However, there are a half dozen other columns that use a Lis validation and also have the STOP error message if invalid data i entered. The problem is that the error message *does not* appear i invalid data is entered. Th...

Validating values of POEMDEV (2nd try cause my MSDN-Abo)
Hi all, I've written a OEMUI.DLL. The basic code comes from the WINDDK sample. The values from the gui are stored in the POEMDEV. VERBOSE(DLLTEXT("UserName :<%s>.\r\n"), ((POEMDEV)pOEMDM)->szUserName); VERBOSE(DLLTEXT("CostCenter:<%s>.\r\n"), ((POEMDEV)pOEMDM)->szCostCenter); VERBOSE(DLLTEXT("ColorMode :<%s>.\r\n"), ((POEMDEV)pOEMDM)->bColorMode ? L"on" : L"off"); I like to find a place in this DLL, where I can verify the values of POEMDEV. Greetings Kai -- ISO Software Systeme GmbH Nurembe...

Possible to include other tags in a XSLT file?
Is it possible to include addition tags in a XSLT file, that the XSLT processor will, for all practical purposes, ignore? What I'm looking to do is to include a section to contain information regarding what parameters the XSLT file is expecting. Then my program can retrieve the information from the style sheet and prompt the user for the necessary parameters. I'm envisioning the section would be something like this: <myParameters> <Param name="City" prompt="City to search for" /> <Param name="State" prompt...

Conditional validation :-)
Hi, I am using list validation in column A where user can choose 1-9 in each cell. What I wish to create is: if A1=1 then the validation list for B1 is 1.1 to 1.9 if A1=2 then the validation list for B1 is 2.1 to 2.9 and so on.... In effect, its conditional which validation list is being used. How do I set this up?? Thanks in advance Robert Hi! Here's one way: Create a table like this somewhere on your sheet: 1 1.1 2.1 3.1 ... 9.1 2 1.2 2.2 3.2 ... 9.2 3 1.3 2.3 3.3 ... 9.3 4 1.4 2.4 3.4 ... 9.4 ... 9 1.9 2.9 3.9 ... 9.9 Assume the table is in the ran...

XSLT query
Hi I am using XSLT to transfor XML to HTML. I have an XSLT variable , $PAGELINK. I need to specify this value as an href attribute value of <a> tag. something like <a href = $PAGELINK> Click me for new page </a>. This is not working for me. $PAGELINK is treated as a text by XSLT engine. I request your help to do this. Thanks Srinivas. Cnu wrote: > I am using XSLT to transfor XML to HTML. > > I have an XSLT variable , $PAGELINK. I need to specify this value as > an href attribute value of <a> tag. > > something like <a href = $PAGELINK&g...

Validating with embedded schema
This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C38929.972F26A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hiya, Is it possible to add a schema as an "embedded resource" in a project = and use that schema to validate some xml? And how about if thet schema = references another schema which has also been embedded? Any ideas? Examples?=20 --=20 ANDREAS H=C5KANSSON STUDENT OF SOFTWARE ENGINEERING andreas (at) selfinflicted.org ------=_NextPart_000_0008_01C38929.972F26A0 Content-Type: text/html; char...

Data Validation problem.
I'm building a comma delimited string through VBA to add a data validation list to a cell. However, I can only seem to get a max of 255 characters to be recognised and populate into the list. Any ideas of how to get around this at all please, or any advise on how to get the list to populate wioth more characters. TIA. Put your list on a worksheet. Then use that range in the data|validation dialog. Debra Dalgleish shows how at: http://contextures.com/xlDataVal01.html#Name DaveO wrote: > > I'm building a comma delimited string through VBA to add a data validation > li...

Validation list #3
I have 2 cells with drop down list in validation cells (VC) . I want the first (VC) to have a default value of the second from bottom value from it'slist, and the second (VC) to have a default of the last value from it's list. Is it possible? Thanks -- EH003268 ------------------------------------------------------------------------ EH003268's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=11806 View this thread: http://www.excelforum.com/showthread.php?threadid=393235 I guess you could simply choose the respective values and save th file. Manges -...

XML Validating Reader problem
From: "R. Raghuraman" <raghuraman@infosys.com> Subject: Problem with XMLValidatingReader? Date: 01 April 2004 11:46 Hi, I have a large xml file to process (~ 70 mb). I am trying to use XMLValidating reader. The first step was to try out the example in quickstart samples with minor modifications [significant portions below]. My intention is to validate the file against a DTD before processing and to collect all validation errors in a single pass. Public Class ValidationReadingXMLSample Private WithEvents myXmlValidatingReader As XmlValidatingReader Private myXmlTextR...

How to limit number of Message Boxes on Validation Error?
Hi I have the following code which highlights validation errors when a user pastes into a range. The problem is that when a large amount of data is pasted (with a suitably large n number of validation errors) the msgbox has to be clicked n times before the corrections can be made. ***Start Code*** Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) Cells.ClearComments Dim TempCell As Range Dim rc As Interger For Each TempCell In ActiveSheet.UsedRange If Not TempCell.Validation.Value Then rc = MsgBox("Please ensure the circled data is entered c...

Validation and application size
Hi experts, I have a minor problem.... In column D i have a data validation list in each cell. Until now, I had only 100 lines in my application. The size of the application was about 300kb Because i do not know how many lines the user will put in, i have made all cells ranging from D4:D65000 with datavalidation. Now my application is about 1.700kb Is there a way to only have a data validation (dropdownlist) in column D when the user puts something in column B on the same line ? How would i program that in VBA ? Thanks, Pierre -- Message posted via OfficeKB.com http://www.officekb.com/...

answer to multiple validation data lists
I posted a few days ago a question on how to make multiple validation lists... I found a VERY simple work around just by trial and error and thought I'd share. In my example, i am making a computer system configurator and will make an example here.. Cell A1 has a list of motherboards, let's say 2 of them. Part #'s in the list are as follows MOTHERBOARDA MOTHERBOARDB Based on that selection, a list of chassis comes up. The list of compatible chasssis for each motherboard is named after the motherboard selection (as required) "MOTHERBOARDA" and "MOTHERBOARDB" s...

Data Validation
Hi I've created a range name that is located on a a second worksheet. How do I get the source dialog to accept the range name? I've tried "=rangename", "=Sheet2!A1:A231".... Hi With validation list, only cell references to same worksheet are allowed. To refer to list on another worksheet in same workbook, you have to define the list as named range (Insert.Name.Define...) To refer to list in another workbook, the safest way will be mirroring it into some sheet (links or ODBC query), define the mirrored list as named range, and refer to named range as list ...

XSLT Doubt
Is it possible to transform Two XML documents at once using XSLT? -- Regards, Prashant C "Prashant C" <PrashantC@discussions.microsoft.com> wrote in message news:4927C455-11C2-46B5-BC51-B8AD21E2B7C0@microsoft.com... > Is it possible to transform Two XML documents at once using XSLT? Yes. Cheers, Dimitre Novatchev ...

VALIDATION RULES #2
I WANT TO SET UP A VALIDATION RULE THAT APPLIES ONLY TO A SPECIFIC COLUMN (INSTEAD OF ENTIRE WORKSHEET), AND ALLOWS DUPLICATE DATA TO BE ENTERED ONLY ONCE. PLS HELP ME! Try this example from Chip Pearson http://www.cpearson.com/excel/NoDupEntry.htm http://www.cpearson.com/excel/duplicat.htm -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "ANGIE" <anonymous@discussions.microsoft.com> wrote in message news:8A54037B-7B7F-4703-9B7D-629C0BDEE4A7@microsoft.com... > > I WANT TO SET UP A VALIDATION RULE THAT APPLIES ONLY TO A SPECIFIC COLUMN (I...

XML Validation: required attributes
Hello All, I was trying to validate an XML document against a XSD which works fine. Then I tried to put in a version attribute on the root element and set it to a fixed value of '1.0' in the schema. Guess what? The validator completely ignores the attribute inspite of the fact that I have set the attribute to be required and to have a fixed value of '1.0'. Any ideas why that could be happening. Any help is appreciated. Uttara Either you didn't do what you thought you did or the validator has a problem. Which validator did you use and what are your schema/instance? ...

Data Validation
Hi I am trying to establish data validation in "WorkbookA" from anothe workbook "WorkbookB". The location of WorkbookB may change from time to time, but will alway be located in same path as WorkbookA, but under a different subroot, sa the "data\" subroot. The rangename that holds the data to be validate is "List_Months" in WorkbookB. I have created a range in WorkbookA called "MyList" by adding th following formula to the "refers to" box, ="'"&LEFT(INFO("directory"),FIND("Data\",INFO("...

Validating XML with XSD kept in memory
Hi all, How can I validate XML against XSD both read from a Database (blob) and where its contents are kept in string-variables? I don't want to go the long way round writing them to files before validating. Thank you, Raimund You should use the constructors that take in StringReader: string xmlString = GetXmlBlobAsString(); string xsdString = GetXsdSchemaAsString(); //Read schema XmlSchema schema = XmlSchema.Read(new StringReader(xmlString), null); XmlTextReader textReader = new XmlTextReader(new StringReader(xmlString)); XmlValidatingReader valReader = new XmlValidatingReader(te...

XSLT with Database
Hi All, Is it possible to query database in XSLT? or pass value to XSLT through C# or VB.NET -- Regards, Prashant C Prashant C wrote: > Is it possible to query database in XSLT? or pass value to XSLT through C# > or VB.NET You have three options: 1) global parameters in the stylesheet e.g. <xsl:param name="param-name"/> which you can set with C# or VB.NET code before you run a transformation, see <URL:http://msdn2.microsoft.com/en-us/library/System.Xml.Xsl.XsltArgumentList.AddParam.aspx> 2) extension "script" coded in VB.NET or C# or JScr...

New to XSLT and can't select even the first node... Any Help?
Hey, brand new to XSL and XSLT. I've downloaded an evaluation copy of XML Spy to debug my transformation, but I can't get to frist base. Can anyone help my get straightened out? My XSLT is: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" /> <xsl:template match="/"> <xsl:for-each select="DataSet_Studio_Appt_Dates/Studio_Appt_Date_Times"> <ItWorked>YEAH</ItWorked> </xsl:for-each> </xsl:t...

Dropdown list data validation
I have a column of cells that contain part names and descriptions. The descriptions are multi-lined within the cell via line feeds of Alt+Enter. I would like to use this range as the source for a data list. However the drop down list generated shows each cell as a continous line. Eg, if I have a cell with Whistle Type: Shiny With chain Then the drop down list row for this is:- WhistleType: ShinyWith chain Is there any way to just use the first line? I know I could separate the name from the description but this will impact on the functionality of the rest of my work!...

XSLT Development Tools?
Hi group, searching in the Internet I found two products for XML which incorporate a very robust debugger for XSL/XSLT, I would like you to see these products and then, give me your opinion about the development environment or recommend me some other that you know. XML IDE's - http://xslt-process.sourceforge.net - http://www.mentattech.com/themes/mentat/alchemist/index.html Regards, Teksure If you're willing to try Beta software there is also an XSL debugger included in Visual Studio 2005 Professional and above which gives you the ultimate debugging experience which is stepping...

Validation error
I'm trying to modify validation for adjacent celss on the fly depending on the value of the previous cell. I've got this code but it is throwing an error. ????? If ActiveCell.Offset(0, -1).Value = "D" Then 'Range(Myaddress).Validation.Modify (xlValidateDate, xlValidAlertInformation, _ xlBetween, ="1/1/2010", ="12/31/2020") Endif What I wound up with was: If ActiveCell.Offset(0, -1).Value = "D" Then With Range(Myaddress).Validation .Delete .Add Type:=xlValidateDate, _ AlertStyle:=xlV...

Validation #8
I have a workbook that is used by multiple people. There are 5 cells where times are entered. There seems to be a problem that people can't enter the right times. I have formulas set up for wait times, so this messes up the results. The columns I have are: Arrival Time Triage Time Registration To ED See MD Discharge Time I want to fix it so that if the tirage time is before the arrival time it gives them a warning. Same with the registration, To ED, etc. How can I do this?? Thanks You are on the right track with "Validation" Select Data Validation, ...