[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: ASN.1 is an XML Schema Language (Fix those lists!) and Bin


asn1 constrained by
Alessandro wrote:
> You can certainly define a content model with <i>'s and <p>'s and
<b>'s 
> in ASN.1 as you can do in XML Schema.... It should be easy for you 
> to do this, by looking at the example above and generalizing it.

The ASN.1 module below is more general than the examples posted by
others. It is also more complete. When combined with an E-XER
encoder/decoder this module will handle XML like:

<text class='random'>Some default text <b>Bold<i>bold and italics</i>
Just Bold </b> No Bold <i id='X'>italics</i> No Italics </text>

I believe that this is what Simon was asking for. Does this do it?

-----------------------------------------
TextDemo DEFINITIONS XER INSTRUCTIONS AUTOMATIC TAGS ::=
BEGIN

Text ::= [NAME AS UNCAPITALIZED] Foo

Foo ::= [NAME AS UNCAPITALIZED] [ELEMENT] [EMBED-VALUES] SEQUENCE {
  embed-values SEQUENCE OF UTF8String,
  tags [ANY-ATTRIBUTES] AttrList (CONSTRAINED BY {}),
  choice-list [UNTAGGED] SEQUENCE OF [UNTAGGED] CHOICE {
	b   Foo,
	i   Foo,
	u   Foo
    }
} (CONSTRAINED BY {})

AttrList ::= SEQUENCE OF UTF8String

ENCODING-CONTROL XER
    GLOBAL-DEFAULTS MODIFIED-ENCODINGS
END
-------------------------------------------

Since this issue seems fairly sensitive, I'd appreciate guidance on
cleaning this little example up from any of the ASN.1 guru types that
may be reading this...

		bob wyman


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.