/ / Valider xpdl avec un schéma xsd - xml, xsd, bizagi

Validez xpdl avec un schéma xsd - xml, xsd, bizagi

Je suis avec le problème suivant:

J'ai besoin de lire un processus au format xpdl qui est un fichier XML spécifique au processus. Ce fichier xpdl est généré par Bizagi.

Sur le site officiel du xpdl, j’ai attrapé le schéma xml, mais lorsque j’essaie de valider le xpdl généré par le bizagi avec le schéma xml que j’ai capturé du site Web, cela donne une erreur.

J'ai essayé de comprendre ce qui avait pu arriver, mais je ne l’ai pas compris.

Tu peux m'aider à comprendre?

J'envoie l'erreur:

 ["level"]=> int(2)
["code"]=> int(1871)
["column"]=> int(0)
["message"]=> string(596) "Element "{http://www.wfmc.org/2009/XPDL2.2}Activities": This element is not expected. Expected is one of ( {http://www.wfmc.org/2009/XPDL2.2}DataStoreReferences, {http://www.wfmc.org/2009/XPDL2.2}Transitions, {http://www.wfmc.org/2009/XPDL2.2}DataAssociations, {http://www.wfmc.org/2009/XPDL2.2}ExtendedAttributes, {http://www.wfmc.org/2009/XPDL2.2}Assignments, {http://www.wfmc.org/2009/XPDL2.2}PartnerLinks, {http://www.wfmc.org/2009/XPDL2.2}Object, {http://www.wfmc.org/2009/XPDL2.2}Participants, {http://www.wfmc.org/2002/XPDL1.0}DataFields, {http://www.wfmc.org/2009/XPDL2.2}Applications ). "
["file"]=> string(66) "file:///C:/Users/dieferson.medeiros/AppData/Local/Temp/php1DBF.tmp"
["line"]=> int(117)

Suit le code que j'utilise pour valider xpdl avec le schéma xml:

libxml_use_internal_errors (true);
$xml = new DOMDocument();
$xml->load($file->getPathname());
var_dump($xml->schemaValidate(__DIR__."/../../../../web/uploads/xsd/xpdl.xsd"));
var_dump(libxml_get_errors());

Suit le lien vers le xpdl:

https://drive.google.com/file/d/0B1uwndG8_xlZSHBzZHZMTUZ0dkk/view?usp=sharing

Suit un lien vers le schéma xml:

https://drive.google.com/file/d/0B1uwndG8_xlZblpZUmY2NkxXaGc/view?usp=sharing

Merci de votre attention.

Réponses:

0 pour la réponse № 1

Ce qu’il dit, c’est que l’élément Activités n’est pas bien situé.

J'ai validé votre .xpdl contre XPDL 2.2 Standard de WFMC

Et je reçois 9 erreurs:

1. "Error: The required attribute "Id" is missing."
2. "Error: The required attribute "Id" is missing."
3. "Error: The required attribute "Id" is missing."
4. "Error: The element "Lane" in namespace "http://www.wfmc.org/2009/XPDL2.2" has invalid child element "ExtendedAttributes" in namespace "http://www.wfmc.org/2009/XPDL2.2". List of possible elements expected: "Performers, NestedLane" in namespace "http://www.wfmc.org/2009/XPDL2.2" as well as any element in namespace "##other"."
5. "Error: The element "Lane" in namespace "http://www.wfmc.org/2009/XPDL2.2" has invalid child element "ExtendedAttributes" in namespace "http://www.wfmc.org/2009/XPDL2.2". List of possible elements expected: "Performers, NestedLane" in namespace "http://www.wfmc.org/2009/XPDL2.2" as well as any element in namespace "##other"."
6. "Error: The element "Lane" in namespace "http://www.wfmc.org/2009/XPDL2.2" has invalid child element "ExtendedAttributes" in namespace "http://www.wfmc.org/2009/XPDL2.2". List of possible elements expected: "Performers, NestedLane" in namespace "http://www.wfmc.org/2009/XPDL2.2" as well as any element in namespace "##other"."
7. "Error: The element "Associations" in namespace "http://www.wfmc.org/2009/XPDL2.2" has incomplete content. List of possible elements expected: "Association" in namespace "http://www.wfmc.org/2009/XPDL2.2"."
8. "Error: The element "Artifacts" in namespace "http://www.wfmc.org/2009/XPDL2.2" has incomplete content. List of possible elements expected: "Artifact" in namespace "http://www.wfmc.org/2009/XPDL2.2"."
9. "Error: The element "WorkflowProcess" in namespace "http://www.wfmc.org/2009/XPDL2.2" has invalid child element "Activities" in namespace "http://www.wfmc.org/2009/XPDL2.2". List of possible elements expected: "DataStoreReferences, Transitions, DataAssociations, ExtendedAttributes, Assignments, PartnerLinks, Object, Extensions" in namespace "http://www.wfmc.org/2009/XPDL2.2"."

... Mais pas celui que vous avez partagé avec nous. Comme je le vois dans votre dossier, Activités est bien situé:

<WorkflowProcess>
...
<Activities>...<Activities/>
</WorkflowProcess>

Pourriez-vous vérifier si le fichier est correct et / ou vérifier les erreurs que je vous transmets? Votre schéma a l'air bien.