How to being building a complex validation tool?
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 8
- Joined: Thu May 15, 2014 10:06 pm
How to being building a complex validation tool?
Hi,
I would like to use oXygen to validate sets of documents. There is no XML creation, but would like to locate errors within a set. The simpler set contains a single XML document and numerous directories with image assets. Data nodes point to the images and sometimes reference elements within the same XML. Each document set is self-contained.
Where do I begin to set up oXygen for this? Should I set up the file sets as projects or use a database? Or does this type of validation need a java-based programming/plug-in?
Thanks.
I would like to use oXygen to validate sets of documents. There is no XML creation, but would like to locate errors within a set. The simpler set contains a single XML document and numerous directories with image assets. Data nodes point to the images and sometimes reference elements within the same XML. Each document set is self-contained.
Where do I begin to set up oXygen for this? Should I set up the file sets as projects or use a database? Or does this type of validation need a java-based programming/plug-in?
Thanks.
-
- Posts: 407
- Joined: Mon Dec 05, 2011 6:08 pm
Re: How to being building a complex validation tool?
Hello,
You can validate multiple XML files in oXygen by performing a batch validation.
First you need add your files to project and organize them at Project level. Then, from the Project view, select the folder where you have the files you need to validate and from the contextual menu go to "Validate" submenu then pick one of the available options.
There are two ways of running such a batch validation on multiple files selected in the Project view:
- with the associated validation scenarios or associated schemas(Validate -> Validate). This means that each file will be validated with its associated validation scenario. If no validation scenario is associated then the file will be validated with the default validation engine and the associated schema(if there is one)
- with a specified schema(Validate -> Validate with...). You will browse for the schema that will be used to validate each of the files.
Another way of organizing your files is to create a logical folder (right click on the root of the project and from the contextual menu choose New > Logical Folder) and link there only the files you want to validate (either add the files manually or drag and drop them). Then, you can perform a batch validation on that logical folder.
Let us know if you need further assistance.
Regards,
Ionela
You can validate multiple XML files in oXygen by performing a batch validation.
First you need add your files to project and organize them at Project level. Then, from the Project view, select the folder where you have the files you need to validate and from the contextual menu go to "Validate" submenu then pick one of the available options.
There are two ways of running such a batch validation on multiple files selected in the Project view:
- with the associated validation scenarios or associated schemas(Validate -> Validate). This means that each file will be validated with its associated validation scenario. If no validation scenario is associated then the file will be validated with the default validation engine and the associated schema(if there is one)
- with a specified schema(Validate -> Validate with...). You will browse for the schema that will be used to validate each of the files.
Another way of organizing your files is to create a logical folder (right click on the root of the project and from the contextual menu choose New > Logical Folder) and link there only the files you want to validate (either add the files manually or drag and drop them). Then, you can perform a batch validation on that logical folder.
Let us know if you need further assistance.
Regards,
Ionela
Ionela Istodor
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 8
- Joined: Thu May 15, 2014 10:06 pm
Re: How to being building a complex validation tool?
Thanks for your reply. However, I am not trying to do a batch validation. I am trying to check one XML document with multiple data nodes pointing to image assets and elements with reference IDs within the same, single XML document.
File structure is like this:
Thanks.
File structure is like this:
- XML
- Directory
- Subdirectories containing images
Code: Select all
<object>
<link>images/assets/company/index.html</link>
</object>
Thanks.
-
- Posts: 2881
- Joined: Tue May 17, 2005 4:01 pm
Re: How to being building a complex validation tool?
Hi,
If you want to check if @hrefs or links correctly point to existing resources, you could use a combination of XSLT 2.0 with Java extensions (java.io.File) and run it with Saxon PE or EE.
e.g.
Instead of the string '/path/to/my/file' you could use a variable or XPath that points to your @href/link.
Regards,
Adrian
If you want to check if @hrefs or links correctly point to existing resources, you could use a combination of XSLT 2.0 with Java extensions (java.io.File) and run it with Saxon PE or EE.
e.g.
Code: Select all
<xsl:variable name="myFileExists" xmlns:file="java:java.io.File" select="file:exists(file:new('/path/to/my/file'))"/>
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service