[xsd-users] External entity declaration in instance documents

Florian Schmidt fschmidt at techfak.uni-bielefeld.de
Thu Aug 26 11:11:06 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

since xerces-c 2 does not support XInclude (or at least so i have read
in the mailing list archives) i'm trying to use external entity
declarations to assemble instance documents..

I have included below a typical instance document. I have disabled
validation using the dont_validate flag. Sadly the parser throws an
exception:

[ParsingErrorHandler]: "An exception occurred! Type:RuntimeException,
Message:When reusing the Grammar, no internal subset is allowed" in
line: 3, column: 23
terminate called after throwing an instance of
'xsd::cxx::tree::parsing<char>'
  what():  instance document parsing failed
Aborted

I think this has once worked with a previous version of XSD [i think it
was 3.2].. I'm currently using XSD 3.3.. So maybe somethign has changed
in the initialization of the xerces-c parser..



<?xml version="1.0"?>

<!DOCTYPE superduper [ <!ENTITY GraspLabTree SYSTEM "grasp_lab_tree.xml"> ]>

<ControlBasis
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:xi="http://www.w3.org/2001/XInclude">

<Controller xsi:type="PrimitiveControllerType">
 <Name>Tree</Name>

 <Coefficient>1</Coefficient>

 <ConvergenceCriterion xsi:type="TaskSpaceDistanceThresholdType">
  <Threshold> 0.001 </Threshold>
 </ConvergenceCriterion>

 <Reference xsi:type="CompositeReferenceType">
  <Reference xsi:type="DummyReferenceType">
   <Vector xsi:type="SimpleVectorType">
    <Coefficient> 0.1 </Coefficient>
    <Coefficient> 0.2 </Coefficient>
    <Coefficient> 0.3 </Coefficient>
   </Vector>
  </Reference>
  <Reference xsi:type="DummyReferenceType">
   <Vector xsi:type="SimpleVectorType">
    <Coefficient> -0.1 </Coefficient>
    <Coefficient> -0.2 </Coefficient>
    <Coefficient> -0.3 </Coefficient>
   </Vector>
  </Reference>
 </Reference>

 <Potential xsi:type="SquarePotentialType">
  <MaxGradientStepNorm> 0.2 </MaxGradientStepNorm>
  <Dimension> 6 </Dimension>
  <Coefficient> 0.01 </Coefficient>
 </Potential>

 <SensorTransform xsi:type="KDLTreePositionSensorTransformType">
  <!-- &GraspLabTree; -->
  <xi:include href="grasp_lab_tree.xml"/>
  <SegmentName>Left.hand.ff1</SegmentName>
  <SegmentName>Left.hand.mf1</SegmentName>
 </SensorTransform>

 <EffectorTransform xsi:type="DampedGenericEffectorTransformType">
  <DampingConstant> 0.1 </DampingConstant>
 </EffectorTransform>

 <CombinationStrategy xsi:type="AddingStrategyType"/>

 <Resource xsi:type="CompositeResourceType">
   <Resource xsi:type="DummyResourceType">
     <Vector xsi:type="BoostVectorType">

<String>[60](0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)</String>
     </Vector>
   </Resource>
   <Resource xsi:type="DummyResourceType">
     <Vector xsi:type="BoostVectorType">
      <String>[2](0,0)</String>
     </Vector>
   </Resource>
  </Resource>

</Controller>
</ControlBasis>


Best wished,
Florian Schmidt

- --
Dipl.-Inform. Florian Paul Schmidt
University of Bielefeld, Neuroinformatics Group, CITEC
Contact:
http://ekvv.uni-bielefeld.de/pers_publ/publ/personDetailAct?id=5504453
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFMdoQKTb4s+qNo4RIRAsVwAKCTe7UiSl2YlfK0uiK+qjV6yLxbqgCfaH9t
dqvA2SaFGUOeBOUcR7/xSFg=
=2Ph8
-----END PGP SIGNATURE-----



More information about the xsd-users mailing list