[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Validation xml against another xml

Subject: Re: Validation xml against another xml
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 9 Jun 2009 19:52:06 +0100
Re:  Validation xml against another xml
Yes, this is an ideal task for XSLT.

something like:

<xsl:template match="references[not(. eq $content)]"/>

is about all you need (as part of an identity transform), where
$content is the value pulled in from file1.xml



2009/6/9 Knight, Michel <michel.knight@xxxxxxxx>:
>
> Hi,
> USING:
> XLST 2.0 with XPATH 2
> OS: Windows XP
> Saxon 9.1.0.6N from Saxonica
>
> Validation with XSLT 2.0 what is the better approach.
>
> I've got 2 XML files and one XSLT file.
> File 1 is the source files that need to verify if a value exist in the
> second xml files.
>
> But the 2 xml file as over 6 000 element, should I even tried to do this
> with xslt.
> (Because were thinking of doing this in a database)
>
>
> Ex:
>
> File 1.xml:
> <root>
>        <meta name="dc.subject" scheme="gccore" content="Corporate
> Services" /> </root>
>
> File 2.xml:
> <root>
>        <references>Corporate Services</references>
>        <references>Fire Services</references>
>        <references>Police Services</references>
>        <references>Ambulances Services</references>
>        ....
>        about 6 000 element...
> </root>
>
>
> So what I want to do is, if the attribute content(content="Corporate
> Services") that I find in the file 1.xml exist
> Then keep the value if not remove it from the Result tree.
>
> I could I tackle this situation?
>
> Your guidance is appreciated.
>
> Michel
>
>



--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.