[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: global types - controlying repetitions with a temp
Hi Michael, thank you for your response. However, I cant think of a rule to get this information. It can be many optins. Is it possible to make a test to the nodes being created? to see if it already exists? thank you ---------------------------------------- > From: mike@xxxxxxxxxxxx > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Date: Mon, 15 Jun 2009 13:12:18 +0100 > Subject: RE: global types - controlying repetitions with a temp var? > > > >>I would like to have a sort of temp variable > > No, that's the procedural way of doing it. You have to change your thinking! > You have to think of the output as a function of the input (or perhaps, as a > function of some intermediate data structure that is itself a function of > the input). One way of doing this is for the intermediate data structure to > contain duplicate types, and for the next phase of processing to eliminate > the duplicates (using the standard Muenchian technique if you're stuck with > 1.0). But there may well be a better way that avoids generating the > duplicates in the first place. Ask yourself the question "I want one type in > the output for every .... ?" (perhaps "for every set of E having the same > property P") > > Regards, > > Michael Kay > http://www.saxonica.com/ > http://twitter.com/michaelhkay > >> -----Original Message----- >> From: Sr. Miguel [mailto:neptuno2@xxxxxxxxxxx] >> Sent: 15 June 2009 12:58 >> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx >> Subject: global types - controlying repetitions with a temp var? >> >> >> >> >> Hello, >> >> Im creating an xml schema using xsl 1.0. In this schema I can >> have, at the same level, repetition of elements names. At the >> same time, Im creating restrictions to this elements. Because >> of that, Im getting errors saying that the same elements must >> be of the same type (the type is the same, but because it is >> custom, the parser sees them as different...). >> >> To solve this I am creating global level types, and then >> refer to them as the types of my elements. The problem here >> is that Im looping a xml file looking for all the >> restrictions (and thus types) I should create, and while >> looping I will be creating the same types more than one time >> to my final schema. >> >> What I would like would be to create just one type for each >> restriction. To accomplish that, I would like to have a sort >> of temp variable where I would write the types Im creating, >> so that before creating each type, I would search that >> variable and see if the type was already created. >> >> Is this possible? Is there any other way to accomplish this? >> >> Thank you >> _________________________________________________________________ >> Windows LiveT: Keep your life in sync. Check it out! >> http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_expl >> ore_012009 > _________________________________________________________________ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|