[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Validation of complex content
- From: Edwin Dankert <edankert@gmail.com>
- To: George Cristian Bina <george@oxygenxml.com>
- Date: Thu, 5 Apr 2012 10:25:44 +0100
Hello George,
> You should look also into Relax NG datatype libraries - basically you can
> define a type for your expressions and write an implementation for that
> datatype for your Relax NG processor, Jing for example, then you should be
> able to use that from a Relax NG schema.
Thank you very much for this. This would have been the solution I
wanted to implement initially however after some looking at the code
and documentation for the different validation languages there didn't
seem to be a clear way to implement this, which lead me to conclude
that this might not generally be regarded as the preferred way to
handle this type of functionality and prompted my question.
However if you say that this is actually possible and a valid way to
handle this issue and I am well aware of your experience in this area,
I will definitely look at this again but now in more depth using the
pointers you provided.
Thanks again,
Edwin
On 4 April 2012 19:56, George Cristian Bina <george@oxygenxml.com> wrote:
> Hi Edwin,
>
> You should look also into Relax NG datatype libraries - basically you can
> define a type for your expressions and write an implementation for that
> datatype for your Relax NG processor, Jing for example, then you should be
> able to use that from a Relax NG schema.
>
> Best Regards,
> George
> --
> George Cristian Bina
> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
>
>
> On 3/30/12 3:35 PM, Edwin Dankert wrote:
>>
>> Hello,
>>
>> I hope you can guide me in the best way to proceed with this validation
>> issue.
>>
>> I have a XML structure with most of the nodes representing simple
>> data, like names, references and numeric values.
>>
>> <person>
>> <name>John<name>
>> <salary>1000<salary>
>> </person>
>>
>> However some of the numeric nodes can not only represent the data as
>> simple numeric values, they can also be specified as an expression and
>> point to other items in the document.
>>
>> <person xmlns="x">
>> <name>John<name>
>> <salary>100000/$no-of-employees}<salary>
>> </person>
>>
>> The expression language is quite complex and cannot be represented by
>> a regular-expression. The syntax is however specified using EBNF and
>> only the syntax needs to be validated.
>>
>> A XML Schema for this exists:
>>
>> <schema>
>> <element name="person">
>> <sequence>
>> <element name="name" type="Name">
>> <element name="salary" type="string">
>> </sequence>
>> </element>
>> <schema>
>>
>> The goal is to have a standalone tool which can validate using the
>> more simple constraints specified by the schema and also validate the
>> values which contain the expression language.
>>
>> My preferred solution would involve validating the expression value
>> syntax directly from the EBNF using standard XML technologies but
>> don't believe this is currently an option.
>>
>> My questions now is: what would be the best way to validate these
>> values in your opinion or how was this solved in any of your previous
>> projects? (Note: The validator tool-set already includes Java, NVDL,
>> XSLT 2.0, XML Schema 1.0.)
>>
>> Any suggestions are very welcome.
>>
>> Thanks in advance,
>> Edwin
>>
>> _______________________________________________________________________
>>
>> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
>> to support XML implementation and development. To minimize
>> spam in the archives, you must subscribe before posting.
>>
>> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
>> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
>> subscribe: xml-dev-subscribe@lists.xml.org
>> List archive: http://lists.xml.org/archives/xml-dev/
>> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>>
>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]