• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to, XSLT?

 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a XSD file which has some defined enumeration for a particular tag (Say Country),with enumeration values (Say America,Australia,Asia).
Now I can manually create an instance XML confereing to this XSD.
But how can i do that by programming,how my program (Say Java or XSLT) will know that it should pick one of the enumeration value for the tag Country specified in XSD file,then create XML file.
Can XSLT read XSD file ??.
Lost my lateral thinking so please answer.Waiting for replys.
Regards
Balaji.
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XML schemas are well-formed XML documents, so XSLT can work on them.
If you can read Wrox's "Professional XM Schema" book, there are two chapters, 10 and 16 about working with schemas. If not, download code for chapter 10:
http://www.wrox.com/ACON12H4.asp?WROXEMPTOKEN=529321ZAQsFYcVtmF2p8sJWgEo&ISBN=18610054 74
there are two XSL stylesheets that read Schema and produce documentation and HTML form to edit an instance document.
Instead of chapter 16 you can read about SBP (schema-based programming, it more complex solution as far as I can tell) here: www.aspalliance.com/mcorning and here: www.terracogito.redmond.wa.us/blueprints.htm
[ March 21, 2002: Message edited by: Mapraputa Is ]
 
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic