Loading ...
Sorry, an error occurred while loading the content.

Re: trouble with trang dtd to xsd converter - resolved

Expand Messages
  • yjaques
    Dear all, Quite by accident I discovered I needed to type the root element, as in:
    Message 1 of 9 , Apr 22, 2004
    • 0 Attachment
      Dear all,

      Quite by accident I discovered I needed to type the root element, as in:

      <xs:element name="FIGISDoc" type="FIGISDocType"/>
      <xs:complexType name="FIGISDocType">

      and then all my woes were resolved. I have to say I'm enormously impressed by the Trang converter, after having attmpted conversion with a variety of products, Trang was the only one that could do a decent job of converting our large, modular DTD containing an element library of around 700 elements.

      hats off to Trang.

      -- Yves

      --- In xml-doc@yahoogroups.com, "yjaques" <yves.jaques@f...> wrote:
      > Yes I agree with you, with the DTD I would typically also validate
      > with XMetal. Does anyone have any particular recommendations for a
      > good schema validator? I have so far tried a variety of apps, all of
      > which give inconsistent results.
      >
      >
      > --- In xml-doc@yahoogroups.com, "Annette Marx" <annette.marx@a...>
      > wrote:
      > > Hi Yves,
      > >
      > > I have not looked at your XSD, but generally XML Spy is more
      > permissive
      > > than other applications. For example, in XML Spy you can use an
      > entity
      > > in a DTD, and define it only AFTER that - XML spy just seems to look
      > > through the whole file, and use the entity it finds. When you try to
      > > validate that in something else, it throws an error about missing
      > > entities.
      > >
      > > So the fact that it validates in XML spy does not necessarily mean
      > that
      > > its really valid...I'd try to validate in another application.
      > >
      > > Hth
      > >
      > > Annette
      > >
      > > -----Original Message-----
      > > From: yjaques [mailto:yves.jaques@f...]
      > > Sent: Dienstag, 20. April 2004 17:14
      > > To: xml-doc@yahoogroups.com
      > > Subject: [xml-doc] trouble with trang dtd to xsd converter
      > >
      > > After pounding my head for three days, I thought I'd better write
      > the
      > > group to see if anyone can have a look see at my problem. I have
      > > converted a large, complex DTD to XSD using Trang. According to
      > > XMLSpy, it is valid. However, I cannot correctly assign it to an
      > XML
      > > file. If anyone could give a try at loading it and give me a hint,
      > I
      > > would be bery grateful:
      > >
      > > http://193.43.36.85/Dtd/Beta/3.5/schema/figisdoc3.5.xsd
      > >
      > > thanks,
      > > Yves Jaques
      > > Information Officer FIDI
      > > FIDI - room F-320
      > > United Nations Food and Agriculture Organisation
      > > viale delle Terme di Caracalla - 00100 Roma - ITALIA
      > >
      > >
      > >
      > >
      > >
      > >
      > > Yahoo! Groups Links
    • Michael Smith
      And hats off to James Clark... By the way, I m sure what your reasons for needing an XSD version of your schema/DTD are, but have you considered working with
      Message 2 of 9 , Apr 22, 2004
      • 0 Attachment
        And hats off to James Clark...

        By the way, I'm sure what your reasons for needing an XSD version of
        your schema/DTD are, but have you considered working with Relax NG?

        I think that if you were to choose Relax NG as the "source" schema
        language for maintaining your schema, you'd find it (and its "compact
        syntax" especially) to be much, much easier to work with and maintain
        than XSD. You could first convert your DTD to Relax NG, then maintain it
        from then on in Relax NG and generate XSD and DTD from that.

        --Mike

        yjaques <yves.jaques@...> writes:

        > Dear all,
        >
        > Quite by accident I discovered I needed to type the root element, as in:
        >
        > <xs:element name="FIGISDoc" type="FIGISDocType"/>
        > <xs:complexType name="FIGISDocType">
        >
        > and then all my woes were resolved. I have to say I'm enormously
        > impressed by the Trang converter, after having attmpted conversion
        > with a variety of products, Trang was the only one that could do a
        > decent job of converting our large, modular DTD containing an element
        > library of around 700 elements.
        >
        > hats off to Trang.
        >
        > -- Yves
        >
        > --- In xml-doc@yahoogroups.com, "yjaques" <yves.jaques@f...> wrote:
        > > Yes I agree with you, with the DTD I would typically also validate
        > > with XMetal. Does anyone have any particular recommendations for a
        > > good schema validator? I have so far tried a variety of apps, all of
        > > which give inconsistent results.
        > >
        > >
        > > --- In xml-doc@yahoogroups.com, "Annette Marx" <annette.marx@a...>
        > > wrote:
        > > > Hi Yves,
        > > >
        > > > I have not looked at your XSD, but generally XML Spy is more
        > > permissive
        > > > than other applications. For example, in XML Spy you can use an
        > > entity
        > > > in a DTD, and define it only AFTER that - XML spy just seems to look
        > > > through the whole file, and use the entity it finds. When you try to
        > > > validate that in something else, it throws an error about missing
        > > > entities.
        > > >
        > > > So the fact that it validates in XML spy does not necessarily mean
        > > that
        > > > its really valid...I'd try to validate in another application.
        > > >
        > > > Hth
        > > >
        > > > Annette
        > > >
        > > > -----Original Message-----
        > > > From: yjaques [mailto:yves.jaques@f...]
        > > > Sent: Dienstag, 20. April 2004 17:14
        > > > To: xml-doc@yahoogroups.com
        > > > Subject: [xml-doc] trouble with trang dtd to xsd converter
        > > >
        > > > After pounding my head for three days, I thought I'd better write
        > > the
        > > > group to see if anyone can have a look see at my problem. I have
        > > > converted a large, complex DTD to XSD using Trang. According to
        > > > XMLSpy, it is valid. However, I cannot correctly assign it to an
        > > XML
        > > > file. If anyone could give a try at loading it and give me a hint,
        > > I
        > > > would be bery grateful:
        > > >
        > > > http://193.43.36.85/Dtd/Beta/3.5/schema/figisdoc3.5.xsd
        > > >
        > > > thanks,
        > > > Yves Jaques
        > > > Information Officer FIDI
        > > > FIDI - room F-320
        > > > United Nations Food and Agriculture Organisation
        > > > viale delle Terme di Caracalla - 00100 Roma - ITALIA
      • yjaques
        Thanks for the idea on Relax. I had in fact looked at Relax and it seems a good deal less cumbersome than XSD. I will definitely consider the move. It s just
        Message 3 of 9 , Apr 23, 2004
        • 0 Attachment
          Thanks for the idea on Relax. I had in fact looked at Relax and it
          seems a good deal less cumbersome than XSD. I will definitely
          consider the move. It's just that our partners use XSD and we're
          trying to line up with them, so I don't know. Your idea is intersting
          about converting as needed. It's one of the reasons I wanted to move
          away from DTD's, so I could use XSL to create sub-schemas. I guess if
          I thought I could rely on something like trang to do a hassle-free
          conversion from Relax to XSD, I would be interested. Is this the case?

          -- Yves

          --- In xml-doc@yahoogroups.com, Michael Smith <smith@x> wrote:
          > And hats off to James Clark...
          >
          > By the way, I'm sure what your reasons for needing an XSD version of
          > your schema/DTD are, but have you considered working with Relax NG?
          >
          > I think that if you were to choose Relax NG as the "source" schema
          > language for maintaining your schema, you'd find it (and
          its "compact
          > syntax" especially) to be much, much easier to work with and
          maintain
          > than XSD. You could first convert your DTD to Relax NG, then
          maintain it
          > from then on in Relax NG and generate XSD and DTD from that.
          >
          > --Mike
          >
          > yjaques <yves.jaques@f...> writes:
          >
          > > Dear all,
          > >
          > > Quite by accident I discovered I needed to type the root element,
          as in:
          > >
          > > <xs:element name="FIGISDoc" type="FIGISDocType"/>
          > > <xs:complexType name="FIGISDocType">
          > >
          > > and then all my woes were resolved. I have to say I'm enormously
          > > impressed by the Trang converter, after having attmpted conversion
          > > with a variety of products, Trang was the only one that could do a
          > > decent job of converting our large, modular DTD containing an
          element
          > > library of around 700 elements.
          > >
          > > hats off to Trang.
          > >
          > > -- Yves
          > >
          > > --- In xml-doc@yahoogroups.com, "yjaques" <yves.jaques@f...>
          wrote:
          > > > Yes I agree with you, with the DTD I would typically also
          validate
          > > > with XMetal. Does anyone have any particular recommendations
          for a
          > > > good schema validator? I have so far tried a variety of apps,
          all of
          > > > which give inconsistent results.
          > > >
          > > >
          > > > --- In xml-doc@yahoogroups.com, "Annette Marx"
          <annette.marx@a...>
          > > > wrote:
          > > > > Hi Yves,
          > > > >
          > > > > I have not looked at your XSD, but generally XML Spy is more
          > > > permissive
          > > > > than other applications. For example, in XML Spy you can use
          an
          > > > entity
          > > > > in a DTD, and define it only AFTER that - XML spy just seems
          to look
          > > > > through the whole file, and use the entity it finds. When you
          try to
          > > > > validate that in something else, it throws an error about
          missing
          > > > > entities.
          > > > >
          > > > > So the fact that it validates in XML spy does not necessarily
          mean
          > > > that
          > > > > its really valid...I'd try to validate in another
          application.
          > > > >
          > > > > Hth
          > > > >
          > > > > Annette
          > > > >
          > > > > -----Original Message-----
          > > > > From: yjaques [mailto:yves.jaques@f...]
          > > > > Sent: Dienstag, 20. April 2004 17:14
          > > > > To: xml-doc@yahoogroups.com
          > > > > Subject: [xml-doc] trouble with trang dtd to xsd converter
          > > > >
          > > > > After pounding my head for three days, I thought I'd better
          write
          > > > the
          > > > > group to see if anyone can have a look see at my problem. I
          have
          > > > > converted a large, complex DTD to XSD using Trang. According
          to
          > > > > XMLSpy, it is valid. However, I cannot correctly assign it to
          an
          > > > XML
          > > > > file. If anyone could give a try at loading it and give me a
          hint,
          > > > I
          > > > > would be bery grateful:
          > > > >
          > > > > http://193.43.36.85/Dtd/Beta/3.5/schema/figisdoc3.5.xsd
          > > > >
          > > > > thanks,
          > > > > Yves Jaques
          > > > > Information Officer FIDI
          > > > > FIDI - room F-320
          > > > > United Nations Food and Agriculture Organisation
          > > > > viale delle Terme di Caracalla - 00100 Roma - ITALIA
        • Sebastian Rahtz
          ... no. it is trouble free only if you write Relax NG in a defensive fashion. It is certainly _not_ the case that trang will generate XSD from arbitrary Relax
          Message 4 of 9 , Apr 23, 2004
          • 0 Attachment
            yjaques wrote:
            > I guess if
            > I thought I could rely on something like trang to do a hassle-free
            > conversion from Relax to XSD, I would be interested. Is this the case?

            no. it is trouble free only if you write Relax NG in a
            defensive fashion.
            It is certainly _not_ the case that trang will generate XSD
            from arbitrary
            Relax NG. I know it to my cost :-}

            --
            Sebastian Rahtz Information Manager
            Oxford University Computing Services
            13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
          • Eric Armstrong
            ... Which constructs does one need to avoid? Do you have any particulars you could share? thanks
            Message 5 of 9 , Apr 24, 2004
            • 0 Attachment
              Sebastian Rahtz wrote:

              >
              > yjaques wrote:
              >
              >>If I thought I could rely on something like trang to do a hassle-free
              >>conversion from Relax to XSD, I would be interested. Is this the case?
              >
              > no. it is trouble free only if you write Relax NG in a
              > defensive fashion.
              > It is certainly _not_ the case that trang will generate XSD
              > from arbitrary Relax NG. I know it to my cost :-}
              >
              Which constructs does one need to avoid?
              Do you have any particulars you could share?

              thanks
            • Sebastian Rahtz
              ... not really. it gets discussed on the Relax NG mailling list sometimes, but I cant locate a definitive list. Things relating to seems to be what I
              Message 6 of 9 , Apr 25, 2004
              • 0 Attachment
                Eric Armstrong wrote:

                >>It is certainly _not_ the case that trang will generate XSD
                >>from arbitrary Relax NG. I know it to my cost :-}
                >>
                >>
                >>
                >Which constructs does one need to avoid?
                >Do you have any particulars you could share?
                >
                >
                not really. it gets discussed on the Relax NG mailling list sometimes,
                but I cant locate
                a definitive list. Things relating to <choice> seems to be what I trap
                when I attempt a
                cleanup (tho I now cant understand my own code!). I see I also use trang
                -o disable-abstract-elements,
                but I don't have a reliable recipe at all.

                It does not help, of course, that I don't know what software to use to
                test whether an XSD is valid
                or not :-}

                Sebastian
              Your message has been successfully submitted and would be delivered to recipients shortly.