xsl-list
[Top] [All Lists]

RE: [xsl] RE: HTML to XML

2009-06-09 10:07:10

<xsl:variable name="file2root" select="doc('file2')/root"/>
<xsl:key name="k" match="references" use="."/>

then

<xsl:template match="meta">
  <xsl:if test="empty(key('k', @content))">
    <xsl:message>error</xsl:message>

Performance should be no problem using keys. (Using Saxon-SA you wouldn't
even need the keys, the index would be built automatically).

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 

 

-----Original Message-----
From: Knight, Michel [mailto:michel(_dot_)knight(_at_)tc(_dot_)gc(_dot_)ca] 
Sent: 09 June 2009 14:50
To: Knight, Michel; xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] RE: HTML to XML 

 
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.

Ex:

File 1:
<root>
      <meta name="dc.subject" scheme="gccore" 
content="Corporate Services" /> </root>

File 2:
<root>
      <references>Corporate Services</references>
      <references>Corporate Services</references>
      <references>Corporate Services</references>
      <references>Corporate Services</references>
      <references>Corporate Services</references> </root>


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>