how to get schema url using java class
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 99
- Joined: Fri Jul 01, 2022 12:08 pm
how to get schema url using java class
Post by shikhar_472 »
Hi Team,
How to get the document specific SCHEMA URL using java method is there any way
How to get the document specific SCHEMA URL using java method is there any way
image.png
Please see the highlighted value in imageYou do not have the required permissions to view the files attached to this post.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: how to get schema url using java class
Hi,
I did something like this recently using the XML catalog support in Oxygen.
So let's say in the Schema field I place "http://some/location/", then in an Oxygen plugin I can add a priority URI resolver to map the initial schema location to another schema location:
https://www.oxygenxml.com/InstData/Edit ... IResolver-
so in this way I take control in the Java code over the final location of the schema.
Regards,
Radu
I did something like this recently using the XML catalog support in Oxygen.
So let's say in the Schema field I place "http://some/location/", then in an Oxygen plugin I can add a priority URI resolver to map the initial schema location to another schema location:
Code: Select all
pluginWorkspace.getXMLUtilAccess().addPriorityURIResolver(new URIResolver() {
@Override
public Source resolve(String href, String base) throws TransformerException {
if(SCHEMA_URI_REF.equals(href)) {
URL schemaRef = getClass().getResource(SCHEMA_LOCATION);
if(schemaRef != null) {
return new StreamSource(schemaRef.toString());
}
}
return null;
}
});
so in this way I take control in the Java code over the final location of the schema.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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