Is it possible to define a schema that a xml tag can contains xml or text?

so xml could look like

<field>test</field>

or

<field><test>this is a test</test></field>

thanks!


0
davidw4067 (15)
2/28/2006 12:31:35 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
528 Views

Similar Articles

[PageSpeed] 33


davidw wrote:

> so xml could look like
> 
> <field>test</field>
> 
> or
> 
> <field><test>this is a test</test></field>


Example for mixed contents that allows both your above examples:

       <xs:element name="field" maxOccurs="unbounded">
         <xs:complexType mixed="true">
           <xs:sequence>
             <xs:element name="test" type="xs:string" minOccurs="0" />
           </xs:sequence>
         </xs:complexType>
       </xs:element>

See the schema primer
   <http://www.w3.org/TR/xmlschema-0/#mixedContent>
for more explanation and more examples.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
2/28/2006 12:07:59 PM
Reply:

Similar Artilces:

auto numbering text
I have a cell (D6) that has text AV1 in it. Is it possible to have cell A20 check to see if B20 has a number greater than 0 in it, if it does return AV1-1. If there isn't return a blank or "-". At the moment A20 has the following formula in it: =IF('A-V Input'!B20>0,"AV1-1","") I need to copy this 20 times and the change "AV1-1" manually using the above formula. There are other parts but I want to try and solve this first Thanks, One guess .. Put in A20: =IF('A-V Input'!B20>0,INDIRECT($D$6)-1,"") wh...

XSD Schema
Hi Friends, Can you please help me out in describing an complex type that extends another simple type. I am trying to do this thing in Visual Studio .Net but when I try to create the DataSet for my Schema it is not getting created. In the below pasted code my complex type is extending a Simple Type: Following is the schema I am trying to create: ---------------------------------- <?xml version="1.0" encoding="utf-8" ?> <xs:schema id="TestNew" targetNamespace="http://tempuri.org/TestNew.xsd" elementFormDefault="qualified" xm...

Read XML file as an Access table?
Is there any way to process an XML file as an Access table or does the XML have to be imported to a table first? I did some experiments and XML processing appears to be extremely slow; is there any way to speed it up? Thanks. ...

reset defined ranges
hi, is there a way to reset (not just delete) the named ranges back to the original references so the formulas would still work? Using Excel 2007 thank you -- ______ Regards, Greg No, you cannot restore a name back to some previous reference. Once you change the location to which a name refers, you can't automatically go back to some prior value. Cordially, Chip Pearson Microsoft Most Valuable Professional, Excel, 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com On Tue, 11 May 2010 11:30:02 -0700, Greg <Greg@discussions.microsoft.com> ...

Is it possible
I would like to know is it possible to make million dollar in the internet, if you have any suggestions, write on my forumhttp://isitpossible.truemillion.comMark...

why can I not see any images in my email messages?
Up until yesterday all of my messages came through fine but today they are with text only and no images?? What version of Outlook are you using? Does Outlook suggest that you click on the information bar to download pictures? -- -Ben- Ben M. Schorr, MVP Roland Schorr & Tower http://www.rolandschorr.com http://www.officeforlawyers.com/outlook.htm Author: The Lawyer's Guide to Microsoft Outlook 2007: http://tinyurl.com/ol4law-amazon "Tonie" <Tonie@discussions.microsoft.com> wrote in message news:CA454974-1786-4FFA-AB38-9F661F372542@microsoft.com... ...

Excel TRIM() can't handle &nbsp; in pasted HTML
Has anyone seen this kind of misbehavior? 1. Create a table in HTML like: <table><tr> <td align="right" nowrap>214,074&nbsp;</td> <td align="right" nowrap>55,859&nbsp;</td> <td align="right" nowrap>26.09&nbsp;</td> <td align="right" nowrap>267,102&nbsp;</td> <td align="right" nowrap>71,365&nbsp;</td> <td align="right" nowrap>26.72&nbsp;</td> </tr></table> (this is actually created by a very silly application we bou...

How can I display a picture in publisher, it's just a blank frame?
I've inserted a picture in a publisher 2003 document and it shows in the Graphics Manager thumbnail but not on the page. What am I doing wrong? Bring it to the top and make it transparent. -- Don Vancouver, USA "NorthPoint" <NorthPoint@discussions.microsoft.com> wrote in message news:321873D8-C595-4AD7-ABC1-08461A768515@microsoft.com... > I've inserted a picture in a publisher 2003 document and it shows in the > Graphics Manager thumbnail but not on the page. What am I doing wrong? It seems that I have a problem similar to "Sam the V U Man" ...

Merging/Linking XML files?
This is a multi-part message in MIME format. ------=_NextPart_000_001C_01C35777.BB482CA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have an XML document that is linked to other document and I can't = figure out what the best way to try and merge them before query qith an = XpathNavigator. Simple example...a root xml document contains the root folder that can = contain items and other folders. The other folders can either live in = the root document or be in other xml files completely (to make it easier = for multiple developer...

user-defined data type capabilities
It seems I use Microsoft Visual Basic 6.5 from Microsoft Excel 2003. I've just introduced my first user-defined data type (UDT) to a module. I found it greatly simplified passing parameters. Private Type Journey Depart As String Arrive As String End Type What can I do with such UDTs? 1) Declare functions and scalar, array, and parameter variables. 2) Assign e.g. Dim A as UDT, B as UDT: A = B 3) Not compare variables. e.g. if UDT0 = UDT1 ... gets an error. What else can UDTs be used for? When, in the Visual Basic Editor (VBE), I hover over code referencing a v...

Can I prevent the Setup Solution from building Every time?
Studio.net I'd liek to keep my setup solution, which is in my projects and depends on the project output, from building each time I go to debug. Is there any way to do that? I can select the project and build ony the project but when I want to run (F5) I have to wait for the installer to build each time. THanks You can use the Configuration Manager (under the Build menu) to deselect projects from building when a selected configuration is built. In article <GLWxe.83$6%2.17@newssvr21.news.prodigy.com>, noemail@all.com says... > Studio.net > I'd liek to keep my setup s...

How can we refer to "Date last saved" field's values(windows7)
There is "Date last saved" field in windows7 explorer. How can we refer to the value? Is it equal to LastAccessTime? or LastWriteTime? or ChangeTime? Why not try it yourself? Write a program or find a utility that can set all three to different values and see which one pops up as "Dave last saved". The second sounds most likely. "Benjamin" <crazytazo@gmail.com> wrote in message news:2c1790a9-298c-499d-9727-356923338574@m27g2000prl.googlegroups.com... > There is "Date last saved" field in windows7 explorer. > > Ho...

Personal Folders in OWA
Hello, I have just enabled OWA on our Exchange 2003 SP2 through ISA Server 2004. Is there any way to access personal folders in OWA? Thanks in advance. If by personal folders you mean .pst files, the answer is NO! Sorry. C C wrote: > Hello, > > I have just enabled OWA on our Exchange 2003 SP2 > through ISA Server 2004. Is there any way to > access personal folders in OWA? > > Thanks in advance. > > "C C" <someone@atsbcglobal.net> wrote: >I have just enabled OWA on our Exchange 2003 SP2 >through ISA Server 2004. Is there any way...

Downloading Statements Directly Not Possible
I have Money 2002 installed on an Win XP Pro SP1 machine. Something happened and I probably did it, that causes the statement downloads not to go directly to the account. Rather they want to be saved in a file and then opened into Money. I then have to delete the download. I have tried several things in order to fix this: 1. I verified the file associations of OFC, OFX were correct. They were. 2. Lowered all my security settings in IE. Even put banks into Trusted site zone. No go. 3. Made new accounts. Didn't help. 4. My IE cache is large (500MB) and regularly cleaned out. 5. I made s...

Editing XML data relation line
I am working on a program where I am retrieving data from an Access database through one common dataset. I have already put the database connection component on the form as well as the two data adapters. Here is where I am having problems. I double click on the .xsd file and then go to the schema menu and select add|new relationship. My table names are Employee and Payroll. Employee ID is a primary key in the Employee table and a foreign key in the Payroll table. I need to define a DataRelation link with Employee ID. The problem is that when the parent table is set to Employee and the ch...

Missing Data in Spreadsheet Contained in a Disk Image
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I used Migration Assistant to copy all my applications and files to my new iMac i7. When I attempt to open a vital password protected Disk Image, the .dmg opens OK but the Excel file contained within doesn't have any data in it. Taking a copy of the .dmg from a backup disk results in the same thing. <br><br> What's really peculiar 'though is that if I right click the file before actually opening it, using Quick Look, it shows all the data is there. But the file still won't open the Ex...

Add text to formula?
I have this formula kindly given to me in one of these Excel ngs: =COUNTIF(E:E,"You Won!*")&":"&COUNTIF(E:E,"You Lost*") The challenge is that any custom text I add to the cell formatting doesn't show up in the cell. Would it be possible to add something like this text below to the above (but also including line breaks)?: **************************************************************** Score --------- You:Computer = Formula result of: =COUNTIF(E:E,"You Won!*")&":"&COUNTIF(E:E,"You Lost*") *********************...

Problem saving spreadsheet as xml
I have MS Office 2003 and an Excel spreadsheet that I want to save as an "xml", for use on my website but I want to password it so that anyone viewing it online can't change anything. When I select "Save" and then "Tools" (as I have been shown to do and it worked for them!) and then "General Options", I get a dialogue box headed "Save Options" but both "Password to View" and "Password to Modify" are greyed out and I can't do anything with them. I selected, instead, "Read-only recommended", thinking t...

Summing specific texts
Hi, please help me, I need assistance: I am trying to find the total number of times a specific word has bee entered in a column. I tried using LEN and SUBSTITUE but it seems lik that only works if it's a single letter? Here's the details - some one much smarter than I am will surely hav an answer for me? Word is *Toffee * (and is written in A1) The field is *D1 to D600 *(a text formatted column containing singl words in each cell) -I have had some success with the LEN and SUBSTITUTE formula when usin a single letter but I have had to write out the whole field a D1&D2&D3&...

Can't Drag and drop attachment onto Desktop???
Hello, I have a problem where I can't Copy and Paste or Drag a WORD, EXCEL or .TXT file attachment onto the Desktop from Outlook 2002 SP2 email message.. Laptop has Windows 2000... I get some " An error occurred while copying the file"... and vola... nothing on the desktop??? I could however do copy-and-paste/drag and drop an embedded message which was an attachment to the desktop!!! Weird... Ctrl C / Ctrl V doesn't work either... Other than that, I can copy and paste / drag and drop in Windows Explorer fine...??? What I've tried to do to fix problem is: *Ran De...

is this possible? reload a form that is based on a query with new query that is defined in the form.
I have a basic form. The form is based on a query, so when I open the form, a pop comes up where I enter in what I want to query. So instead of 30,0000 records, I get 1-10 records. on the form, I have a text box. I want to be able to enter in what I want to query next and afterupdate have the recordset/form reload with that query instead of my original qeury. I figure this has to be done with VB. I am just starting to learn some VB but I am lost. Any info would be great, thank you. It does. You need to apply the new query or table name, or the sql string to the forms recordsource, then...

Radar Charting problems, Can I change...
Hi people I have 2 queries relating to Radar charts in Excel (Office XP/2002). Can I change the angle/start position of the first plotted point? I always starts at 12 o'clock but I want it to start at 9 o'clock. I ca re-order the data to achieve this effect but the data, to the viewer is not in a logical sequence if I do that. Then also, can I change the direction of the plotting from clockwise t anti-clockwise? Thanks in advance. Stell -- Message posted from http://www.ExcelForum.com Stella - You can't do these things (unless someone smarter than me knows how), but you c...

Possible to detect changes to an XmlDocument object?
If I instantiate an XmlDocument object, the load a file through the Load method, is there a way, later on in execution, to easily determine if the XmlDocument object has changed from the original version loaded? I'd like to be able to check a condition to see if the document in memory has been editted (i.e., nodes added, attributes changed, etc.) so that my user can decide whether or not to commit changes to the disk file before moving to another file. Will I have to resort to re-loading the file, and comparing OuterXml properties? Gabe Gabe Covert wrote: > I'd like t...

deserialize CDATA section in XML
Hi, I have got xml document with CDATA sections containing special characters like links to images. All Iwant is to display the content withing my div section. Can you provide me a snippet of a code. Thank you in advance. Darek T. Dariusz Tomo� wrote: > I have got xml document with CDATA sections containing special characters > like links to images. All Iwant is to display the content withing my div > section. Can you provide me a snippet of a code. Can you show us an example of the CDATA section and show us what kind of HTML you want to generate? Then we can certainly hel...

Is it possible to compare a string and a field name
I have the following tables: Membership, Subscriptions, OfficeUseOnly. The Office Table contains a Year, Year To and From [financial year] and the other fields are the 5 membership types (regular, student etc) and these 5 fields contain the different amount each type of member has to pay. I want to create a form whereby on entering the financial year and the membership type the correct amount is automatically inserted into the 'Amount' field: FinancialYear - in current form = OfficeUseOnly SubsFinYear and then if MemberType = 'Student' find Student field ...