Transform using xml and xsd

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael

    #1

    Transform using xml and xsd

    I am doing a transform using an xml document and an xslt based on the
    xml document. What I want to do is create the xslt from the xsd so that
    it uses types rather than names.

    The problem i have is that neither the xsltransform object or an
    xmldocument object allow you to assign a schema so how will the
    transform know it is based on a schema rather than an instance.

    I am passing strings to both objects rather than files and neither can
    guarentee that any path included would exist on the machine where the
    transformation will happen.

    Thanks in advance

    Michael

  • Martin Honnen

    #2
    Re: Transform using xml and xsd



    Michael wrote:
    [color=blue]
    > I am doing a transform using an xml document and an xslt based on the
    > xml document. What I want to do is create the xslt from the xsd so that
    > it uses types rather than names.
    >
    > The problem i have is that neither the xsltransform object or an
    > xmldocument object allow you to assign a schema so how will the
    > transform know it is based on a schema rather than an instance.[/color]

    XslTransform and XmlDocument in .NET 1.0/1.1 indeed do not have any
    access to schema information so all XSLT transformations you are doing
    with those .NET versions are not in any way schema aware.
    I am not sure I understand how you want to "create the xslt from the
    xsd" and what using "types rather than names" is supposed to look like
    in XSLT 1.0/XPath 1.0, perhaps what you want to do is not possible. But
    maybe you can explain in more detail what you want to do.


    --

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/

    Comment

    • Oleg Tkachenko

      #3
      Re: Transform using xml and xsd

      Michael wrote:[color=blue]
      > I am doing a transform using an xml document and an xslt based on the
      > xml document. What I want to do is create the xslt from the xsd so that
      > it uses types rather than names.[/color]

      You need XSLT 2.0 Schema-aware processor. Microsoft doesn't provide any
      of these yet. Look at paid version of Saxon.
      --
      Oleg Tkachenko [XML MVP, MCAD]


      Comment

      Working...