Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Schema to express fixed length fields within a tag.

From: "Michael Kay" <mike@--------.--->
To: "'kurt steele'" <kurtsteele@-----.--->, <xmlschema-dev@--.--->
Date: 9/28/2005 10:32:00 AM
> I have an XML document containing this set of fixed-length 
> within a tag:
>  
> <?xml version="1.0"?> 
> <data>8.5  6.54 3.11 6.76 123.0</data>
>  
> These are dew point readings from a sensor, each field is 5 
> bytes long. What would be a schema for this instance?  Can a 
> schema describe untagged data?

You can describe this as a space-separated list of decimals. You might also
be able to devise a pattern that constrains each decimal to occupy five
character positions (not bytes!) but I'm not sure I would bother.
>  
 
> Right now I let this lite XML to flow over the wireless 
> connection then use XSL to generate a fully tagged document. 
> My schema describes the latter.  Can a reference to a 
> stylesheet be embededded in a schema such as to say, "apply 
> this transform to the data before validating"?

No, but you can write a schema-aware XSLT 2.0 stylesheet that invokes schema
validation on its output.

Michael Kay
http://www.saxonica.com/



From shashikala_shamarao@y... Wed Sep 28 21:57:02 2005
Re


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent