SaxonSA validation of result-documents with the error of multiply-defined ID attributes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SaxonSA validation of result-documents with the error of multiply-defined ID attributes

alan.painter
Using SaxonSA 8.5.1, I'm not getting a Validation Error in a result
document that is strongly typed
and contains multiple "id" attributes, of type xs:ID, with the same values.

Feeding these result documents back into Saxon produces a Validation Error.

Is it possible that result-document validation is different from
input-document validation?


        <xsl:result-document copy-namespaces="no" valid="strict"
as="defiml:DL_LoanService">
            ...
        </xsl:result-document>

Thanks for any help

-alan



******************************************************************
This message and any attachments (the "message") are confidential and intended solely for the addressee(s). Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration.Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.                         ***************
Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration.La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, modifie ou falsifie.
******************************************************************


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: SaxonSA validation of result-documents with the error of multiply-defined ID attributes

Michael Kay
I did a quick test of this and can't reproduce it. This is what I tried (use
any source document):

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns="schema99001.uri"
        xmlns:t="schema99001.uri"
        exclude-result-prefixes="xs t"
        default-validation="preserve">

<!-- PURPOSE: Test that a duplicate xs:ID is detected -->
<?spec xslt#validation?>
<?error XTTE1555?>

<xsl:import-schema namespace="schema99001.uri" xml:base="dir/">
<xs:schema targetNamespace="schema99001.uri"
           elementFormDefault="qualified">
<xs:element name="outer">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="inner" maxOccurs="unbounded" type="xs:ID"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>
</xs:schema>
</xsl:import-schema>

<xsl:variable name="doc">
  <outer>
     <inner>a001</inner>
     <inner>a002</inner>
     <inner>a003</inner>
     <inner>a004</inner>
     <inner>a001</inner>
  </outer>
</xsl:variable>    
 
  <xsl:output indent="yes"/>

  <xsl:template match="/">
    <xsl:result-document validation="strict">
      <xsl:copy-of select="$doc"/>
    </xsl:result-document>
  </xsl:template>
 
</xsl:stylesheet>

which gives the message:

Validation error
  ID value 'a001' is not unique
Transformation failed: Run-time errors were reported

Just to be sure, I tried it with an ID attribute as well: same failure
message.

So it looks as if we'll have to look at the failing case more closely to see
exactly what triggers the problem.

Michael Kay
Saxonica

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> [hidden email]
> Sent: 16 September 2005 15:23
> To: [hidden email]
> Subject: [saxon] SaxonSA validation of result-documents with
> the error of multiply-defined ID attributes
>
> Using SaxonSA 8.5.1, I'm not getting a Validation Error in a result
> document that is strongly typed
> and contains multiple "id" attributes, of type xs:ID, with
> the same values.
>
> Feeding these result documents back into Saxon produces a
> Validation Error.
>
> Is it possible that result-document validation is different from
> input-document validation?
>
>
>         <xsl:result-document copy-namespaces="no" valid="strict"
> as="defiml:DL_LoanService">
>             ...
>         </xsl:result-document>
>
> Thanks for any help
>
> -alan
>
>
>
> ******************************************************************
> This message and any attachments (the "message") are
> confidential and intended solely for the addressee(s). Any
> unauthorised use or dissemination is prohibited. E-mails are
> susceptible to alteration.Neither SOCIETE GENERALE nor any of
> its subsidiaries or affiliates shall be liable for the
> message if altered, changed or falsified.                    
>     ***************
> Ce message et toutes les pieces jointes (ci-apres le
> "message") sont confidentiels et etablis a l'intention
> exclusive de ses destinataires. Toute utilisation ou
> diffusion non autorisee est interdite. Tout message
> electronique est susceptible d'alteration.La SOCIETE GENERALE
> et ses filiales declinent toute responsabilite au titre de ce
> message s'il a ete altere, modifie ou falsifie.
> ******************************************************************
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App
> Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Loading...