Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Recursive, Dynamic element tags with type for PCDATA (http://www.velocityreviews.com/forums/t169074-recursive-dynamic-element-tags-with-type-for-pcdata.html)

John-Orr 03-30-2005 01:23 PM

Recursive, Dynamic element tags with type for PCDATA
 
hi guys have a problem....... an XML problem

basically my XML looks like this

<heritage>
<parent>343453
<parent>35634654
<parent>456456
<parent>456456
..........loads more nested parent tags
</parent>
</parent>
</parent>
</parent>
</heritage>

I can't seem to design a schema that will allow me to create a
recursive complex data type and also specify the type of PCDATA i.e.
unsignedint!!!!!!!!!!!!!!!!!


I know there must be a way I have checked all the usual sites etc and
nothing !!!!!!!!!!!!!!!!!!!

Thanks for reading this far guys and gals

JOH


David Carlisle 03-30-2005 01:49 PM

Re: Recursive, Dynamic element tags with type for PCDATA
 

> I know there must be a way


How do you know this:-)

Not using XSD schema as far as I'm aware. Generally if you have control
over the input format you may prefer to not used mixed content like this
but have

<heritage>
<parent><value>343453</value>
<parent><value>35634654</value>
<parent><value>456456</value>
<parent><value>456456</value>
..........loads more nested parent tags
</parent>
</parent>
</parent>
</parent>
</heritage>

which would make life easier for XSD and also other processing with
XPath etc. You could alternatively use other systems for constraining
your original format, relax ng, schematron, etc.

David


All times are GMT. The time now is 12:15 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.